Inherits from NSObject
Declared in BZMediaController.h

Overview

BZMediaController interface is the main interface for the BZMedia framework. This interface exposes all the methods that allow an application to perform the following media tasks:
- Audio Playback
- Audio Recording
- Speech Synthesis
- Speech Recognition on live and file audio
- Device and offline acoustic echo cancelation
- Voice activity detection on recorded audio
- Application audio session configuration
- Real time media event detection and application notification
- Multi-level logging
- Granular application control over all media tasks execution
and more.

A BZMediaController object can be created as follows::

BZMediaController* bzMediaController = [[BZMediaController alloc] init];

Swift
let bzMediaController = BZMediaController()

Tasks

  • – initialize

    Initializes BZMediaController instance of the class. This method must be called before any other methods of the interface are called.

    Method returns a BZ_RESULT value.

  • – getLastMediaErrorCode

    Retrieves the error code (integer) for the last error encountered by the media engine. Call “forBZMediaError” in BZMediaError interface to get a textual representation of the error code.
    This method can be called anytime an unexpected behavior is suspected or encountered to check if the core media engine has encountered any errors, warnings or exceptions.

  • – setLogLevel:

    Sets the logging level for a BZMediaController object.
    Log level can be set to one of the following values: “none”, “fault”, “error”, “default”, “info”, “debug” and “verbose”.
    Default log level is “default” which includes enabled logging for log levels “fault” and “error”.

  • – setModulesLogLevels:

    Sets the logging level for the media modules in the media framework.
    Media modules have the following types: “MediaController”, “MediaEngine”, “MediaEngineWrapper”, “MediaPermissions”, “AudioSession”, “AudioRecorder”, “AudioFileRecorder”, “AudioPlayer”, “PocketSphinxSR”, “AppleSR”, “FliteSS”, “AppleSS” and “AudioStreamer”.
    Log level can be set to one of the following values: “none”, “fault”, “error”, “default”, “info”, “debug” and “verbose”. Each media module can have its own log level.
    Default log level for all media modules is “default” which includes enabled logging for log levels “fault” and “error”.

  • – getModuleLogLevel:

    Retrieves the logging level for one of the media modules in the media framework.
    Media modules have the following types: “MediaController”, “MediaEngine”, “MediaEngineWrapper”, “MediaPermissions”, “AudioSession”, “AudioRecorder”, “AudioFileRecorder”, “AudioPlayer”, “PocketSphinxSR”, “AppleSR”, “FliteSS”, “AppleSS” and “AudioStreamer”.
    Log level is a string value and is set to one of the following values: “none”, “fault”, “error”, “default”, “info”, “debug” and “verbose”.

  • – setVoiceFlowFmwkInfo:build:data:

    This method is reserved and should not be called.

    Method returns a BZ_RESULT value.

  • – getPermissionForVoiceFlowFmwk

    This method is reserved and should not be called.

  • – initializeAudioPlayer

    Initializes the audio player module. This method must be called before calling other methods that require functionlity such as audio playback.

    Method returns a BZ_RESULT value.

  • – releaseAudioPlayer

    Releases the audio player module.

    Method returns a BZ_RESULT value.

  • – configureAudioSession:

    Configures the audio session created by the media framework.

  • – routeDeviceAudioOutput:

    Routes audio playback to a specific audio output destination on a device. Example is to route audio to a device internal speaker or to the device external speaker.

    Method returns a BZ_RESULT value.

  • – playAudio:ssEngine:audioSegment:audioPlayParams:lastAudioSegmentInCollection:

    Provides audio playback for an audio segment. Audio segment can be a recorded audio file or real-time synthesized speech provided by a speech synthesizer for text. This method executes asynchronously when the method returns BZ_SUCCESS.

    Method returns a BZ_RESULT value.

  • – stopPlayAudio

    Instructs media framework to stop audio playback before audio playback completes. This method executes asynchronously when the method returns BZ_SUCCESS.

    Method returns a BZ_RESULT value.

  • – initializeSSEngine:voiceName:languageCode:voiceQuality:

    Initializes a speech synthesizer engine. A speech synthesizer engine must be initialized before methods that require speech synthesis from that engine are called. eSSEngine must be specified. A speech synthesizer voice is selected dependent on the other parameters which may or may not be specified.

    Method returns a BZ_RESULT value.

  • – releaseSSEngine:

    Releases the speech synthesizer engine.

    Method returns a BZ_RESULT value.

  • – getSSEngineState:

    Retrieves the speech synthesizer engine state.

    Method returns a BZSSEngineState value.

  • – getSSVoices:

    Retrieves the voices available for a speech synthesizer engine.

    Method returns an array of voices. Each array entry contains: voice ID, voice name, gender, quality and lang locale.

  • – getActiveSSVoice:

    Retrieves the current active voice name for a speech synthesizer engine.

    Method returns string containing the active voice name.

  • – selectSSVoice:voiceName:languageCode:voiceQuality:

    Selects a specific voice from a speech synthesizer engine. A speech synthesizer engine must be initialized before this method can be called. eSSEngine must be specified. A speech synthesizer voice is selected dependent on the other parameters which may or may not be specified.

    Method returns a BZ_RESULT value.

  • – selectSSVoice:voiceID:

    Selects a specific voice from a speech synthesizer engine using the voice ID. A speech synthesizer engine must be initialized before this method can be called. eSSEngine must be specified.

    Method returns a BZ_RESULT value.

  • – loadSSLexicon:fromLexiconFile:

    Applies to Flite SS only. Loads custom speech synthesis lexicon entries from a file. Example of entries in speech synthesis lexicon file:
    sleekit: s l iy1 k ih0 t
    trochled : t r ao1 k ax0 l d
    mounir : m uw0 n iy1 r

    Method returns a BZ_RESULT value.

  • – loadSSLexicon:fromLexiconList:

    Applies to Flite SS only. Loads custom speech synthesis lexicon entries from an array. Example of array entries:
    sleekit: s l iy1 k ih0 t
    trochled : t r ao1 k ax0 l d
    mounir : m uw0 n iy1 r

    Method returns a BZ_RESULT value.

  • – enableAEC:

    Enables or disables acoustic echo cancelation during audio recording and speech recognition. When audio recording or speech recognition are active simultaneously with active audio playback, accoustic echo cancelation is required on devices that do not offer hardware acoustic echo cancelation. Acoustic echo cancelation decreases the level of audio playback echo from the recorded or recognized audio.

    Method returns a BZ_RESULT value.

  • – isAECEnabled

    Retrieves whether acoustic echo cancelation is enabled or not.

    Method returns a BOOL value.

  • – setAECParams:

    Configures the acoustic echo cancelation parameters as defined in BZAECParams.

    Method returns a BZ_RESULT value.

  • – getAECParams

    Retrieves the acoustic echo cancelation parameters as defined in BZAECParams.

    Method returns a BZAECParams object.

  • – enableVAD:

    Enables or disables voice acrivity detection during audio recording and speech recognition. Voice acrivity detection may be needed with audio recording and speech recognition to manage the behavior of these tasks. Voice activity detection events are also sent to the application.

    Method returns a BZ_RESULT value.

  • – isVADEnabled

    Retrieves whether voice activity detection is enabled or not.

    Method returns a BOOL value.

  • – setVADParams:

    Configures the voice activity detection parameters as defined in BZVADParams.

    Method returns a BZ_RESULT value.

  • – getVADParams

    Retrieves the voice activity detection parameters as defined in BZVADParams.

    Method returns a BZVADParams object.

  • – initializeAudioRecorder

    Initializes the audio recorder module. This method must be called before calling other methods that require functionlity such as audio recording and speech recognition.

    Method returns a BZ_RESULT value.

  • – releaseAudioRecorder

    Releases the audio recorder module.

    Method returns a BZ_RESULT value.

  • – requestMicrophonePermission

    Requests permission for application to use device microphone in order to collect audio from the microphone. If the permission for the application has not yet been granted or denied, the media framework returns the permission decision asynchronously through a media noitification event to the application.

    Method returns a BZ_RESULT value:
    - BZ_PERMISSION_GRANTED or BZ_PERMISSION DENIED if the permission has been previously granted or denied.
    - BZ_PERMISSION_WAIT indicating that the permission to use the microphone is being presented to the application user. User’s decision to grant or deny microphone usage is sent to the application through a notification event.
    - Otherwise, another BZ_RESULT value.

  • – recordLiveAudio:audioSegment:audioRecordParams:

    Provides audio recording from an audio input source on a device.The audio data is saved into an audio segment. This method executes asynchronously when the method returns BZ_SUCCESS.

    Method returns a BZ_RESULT value.

  • – recordFileAudio:audioSegmentSrc:audioSegmentDest:audioPlayParams:audioRecordParams:

    Provides audio recording from an audio segment source to an audio segment destination. This method executes asynchronously when the method returns BZ_SUCCESS.

    Method returns a BZ_RESULT value.

  • – stopRecordAudio

    Instructs media framework to stop audio recording before audio recording completes. This method executes asynchronously when the method returns BZ_SUCCESS.

    Method returns a BZ_RESULT value.

  • – runAEC:renderFile:captureFile:resultFile:renderAudioPlayParams:captureAudioPlayParams:resultAudioRecordParams:

    Provides the capability to run offline acoustic acoustic cancelation on a pre-recorded audio file containing acoustic echo generated from audio playback. This method executes asynchronously when the method returns BZ_SUCCESS.

    Method returns a BZ_RESULT value.

  • – initializeSREngine:languageCode:

    Initializes a speech recognition engine. A speech recognizer engine must be initialized before methods that require speech recognition from that engine are called. eSREngine must be specified.

    Method returns a BZ_RESULT value.

  • – releaseSREngine:

    Releases the speech recognizer engine.

    Method returns a BZ_RESULT value.

  • – requestSpeechRecognitionPermission

    Requests permission for application to use speech recognition on collected audio data. If the permission for the application has not yet been granted or denied, the media framework returns the permission decision asynchronously through a media noitification event to the application.

    Method returns a BZ_RESULT value:
    - BZ_PERMISSION_GRANTED or BZ_PERMISSION DENIED if the permission has been previously granted or denied.
    - BZ_PERMISSION_WAIT indicating that the permission to use speech recognition is being presented to the application user. User’s decision to grant or deny speech recognition is sent to the application through a notification event.
    - Otherwise, another BZ_RESULT value.

  • – getSREngineState:

    Retrieves the speech recognizer engine state.

    Method returns a BZSREngineState value.

  • – getWordPronunciation:word:srPron:ssPron:

    Applies to PocketSphinx SR only. Retrieves the speech recognition pronunciation and corresponding speech synthesis phonemes for a word. The speech recognition pronunciations indicate the way the word should be spoken to be recognized successfully. The speech synthesis phonemes can be sent to Flite SS using the loadSSLexicon method for customized speech synthesis.

    Method returns a BZ_RESULT value.

  • – loadSRTask:srTask:

    Loads a speech recognition task as defined in BZSRTask.

    Method returns a BZ_RESULT value.

  • – unloadSRTask:srTaskID:

    Unloads a speech recognition task identified by the m_strTaskID parameter value of a loaded task configured in a BZSRTask object.

    Method returns a BZ_RESULT value.

  • – unloadAllSRTasks:

    Unloads all speech recognition tasks that have been loaded.

    Method returns a BZ_RESULT value.

  • – loadCustomDictionary:dictFile:

    Applies to PocketSphinx SR only. Loads custom dictionary of words and their corresponding pronunciations (phonemes) for the speech recognizer to recognize the words differently or more accurately. A file pathname URL containing the custom dictionary is used to pass the custom dictionary entries to the speech recognizer.

    Example of custom dictionary entries in file:
    back B AE K
    forward F AO R W ER D
    full F UH L
    half HH AE F

    Method returns a BZ_RESULT value.

  • – loadCustomWordListIntoDictionary:custDictList:

    Applies to PocketSphinx SR only. Loads custom dictionary of words and their corresponding pronunciations (phonemes) for the speech recognizer to recognize the words differently or more accurately. An array containing the custom dictionary is used to pass the custom dictionary entries to the speech recognizer.

    Example of custom dictionary entries in an array:
    back B AE K
    forward F AO R W ER D
    full F UH L
    half HH AE F

    Method returns a BZ_RESULT value.

  • – recognizeLiveAudio:srEngine:srTaskID:srTaskRule:audioRecordParams:srParams:saveAudioFileParams:

    Provides speech recognition on live audio data obtained from an audio input source on a device. This method executes asynchronously when the method returns BZ_SUCCESS.

    Method returns a BZ_RESULT value.

  • – recognizeFileAudio:srEngine:srTaskID:srTaskRule:utteranceFile:audioPlayParams:audioRecordParams:srParams:saveAudioFileParams:

    Provides speech recognition on audio data obtained from a pre-recorded audio utterance file. The execution of this speech recognition task includes real-time streaming of audio data samples from a file to a speech recognizer, and with that, it simulates the execution of recognizeLiveAudio method which streams live audio data samples from an audio input source on a device. This method executes asynchronously when the method returns BZ_SUCCESS.

    Method returns a BZ_RESULT value.

  • – recognizeFileAudioOffline:srEngine:srTaskID:srTaskRule:utteranceFile:srParams:srResults:

    Provides offline speech recognition on audio data obtained from a pre-recorded audio utterance file. The method performs offline speech recognition on audio samples read directly from an utternace without real-time audio streaming. Pocket Sphinx SR completes the speech recognition synchronously whereas Apple SR completes the speech recognition task asynchronously. Both Pocket Sphinx SR and Apple SR send an event notification to the application with the speech recognition result after the speech recognition task is complete, and with that, representing the end of the speech recogniotiuon task.This method executes asynchronously when the method returns BZ_SUCCESS.

    Method returns a BZ_RESULT value.

  • – stopRecognizeAudio:

    Instructs media framework to stop speech recognition before speech recognition completes. This method executes asynchronously when the method returns BZ_SUCCESS.

    Method returns a BZ_RESULT value.

Instance Methods

configureAudioSession:

- (BZ_RESULT)configureAudioSession:(BZAudioSessionParams *)AudioSessionParams

Discussion

Configures the audio session created by the media framework.

Parameters

AudioSessionParams

The audio session parameters as defined in BZAudioSessionParams.

Method returns a BZ_RESULT value.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

enableAEC:

- (BZ_RESULT)enableAEC:(BOOL)bEnableAEC

Discussion

Enables or disables acoustic echo cancelation during audio recording and speech recognition. When audio recording or speech recognition are active simultaneously with active audio playback, accoustic echo cancelation is required on devices that do not offer hardware acoustic echo cancelation. Acoustic echo cancelation decreases the level of audio playback echo from the recorded or recognized audio.

Method returns a BZ_RESULT value.

Parameters

bEnableAEC

Enables or disables acoustic echo cancelation.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

enableVAD:

- (BZ_RESULT)enableVAD:(BOOL)bEnableVAD

Discussion

Enables or disables voice acrivity detection during audio recording and speech recognition. Voice acrivity detection may be needed with audio recording and speech recognition to manage the behavior of these tasks. Voice activity detection events are also sent to the application.

Method returns a BZ_RESULT value.

Parameters

bEnableVAD

Enables or disables voice activity detection.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

getAECParams

- (BZAECParams *)getAECParams

Discussion

Retrieves the acoustic echo cancelation parameters as defined in BZAECParams.

Method returns a BZAECParams object.

Return Value

BZAECParams object. if successul.

Declared In

BZMediaController.h

getActiveSSVoice:

- (NSString *)getActiveSSVoice:(BZSSEngine)eSSEngine

Discussion

Retrieves the current active voice name for a speech synthesizer engine.

Method returns string containing the active voice name.

Parameters

eSSEngine

The speech synthesizer engine. Speech synthesizer engine options are defined in BZSSEngine.

Return Value

A string containing the active voice name.

Declared In

BZMediaController.h

getLastMediaErrorCode

- (int)getLastMediaErrorCode

Discussion

Retrieves the error code (integer) for the last error encountered by the media engine. Call “forBZMediaError” in BZMediaError interface to get a textual representation of the error code.
This method can be called anytime an unexpected behavior is suspected or encountered to check if the core media engine has encountered any errors, warnings or exceptions.

Return Value

An interger value representing the error code.

Declared In

BZMediaController.h

getModuleLogLevel:

- (NSString *)getModuleLogLevel:(NSString *)moduleType

Discussion

Retrieves the logging level for one of the media modules in the media framework.
Media modules have the following types: “MediaController”, “MediaEngine”, “MediaEngineWrapper”, “MediaPermissions”, “AudioSession”, “AudioRecorder”, “AudioFileRecorder”, “AudioPlayer”, “PocketSphinxSR”, “AppleSR”, “FliteSS”, “AppleSS” and “AudioStreamer”.
Log level is a string value and is set to one of the following values: “none”, “fault”, “error”, “default”, “info”, “debug” and “verbose”.

Parameters

moduleType

The type of the media module.

Return Value

A string value representing the log level of the media module.

Declared In

BZMediaController.h

getPermissionForVoiceFlowFmwk

- (BOOL)getPermissionForVoiceFlowFmwk

Discussion

This method is reserved and should not be called.

Return Value

TRUE or FALSE.

Declared In

BZMediaController.h

getSREngineState:

- (BZSREngineState)getSREngineState:(BZSREngine)eSREngine

Discussion

Retrieves the speech recognizer engine state.

Method returns a BZSREngineState value.

Parameters

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

Return Value

A BZSREngineState value.

Declared In

BZMediaController.h

getSSEngineState:

- (BZSSEngineState)getSSEngineState:(BZSSEngine)eSSEngine

Discussion

Retrieves the speech synthesizer engine state.

Method returns a BZSSEngineState value.

Parameters

eSSEngine

The speech synthesizer engine. Speech synthesizer engine options are defined in BZSSEngine.

Return Value

A BZSSEngineState value.

Declared In

BZMediaController.h

getSSVoices:

- (NSArray *)getSSVoices:(BZSSEngine)eSSEngine

Discussion

Retrieves the voices available for a speech synthesizer engine.

Method returns an array of voices. Each array entry contains: voice ID, voice name, gender, quality and lang locale.

Parameters

eSSEngine

The speech synthesizer engine. Speech synthesizer engine options are defined in BZSSEngine.

Return Value

An array of voices.

Declared In

BZMediaController.h

getVADParams

- (BZVADParams *)getVADParams

Discussion

Retrieves the voice activity detection parameters as defined in BZVADParams.

Method returns a BZVADParams object.

Return Value

BZVADParams object. if successul.

Declared In

BZMediaController.h

getWordPronunciation:word:srPron:ssPron:

- (BZ_RESULT)getWordPronunciation:(BZSREngine)eSREngine word:(NSString *)sWord srPron:(NSMutableString *)sSRPhones ssPron:(NSMutableString *)sSSPhones

Discussion

Applies to PocketSphinx SR only. Retrieves the speech recognition pronunciation and corresponding speech synthesis phonemes for a word. The speech recognition pronunciations indicate the way the word should be spoken to be recognized successfully. The speech synthesis phonemes can be sent to Flite SS using the loadSSLexicon method for customized speech synthesis.

Method returns a BZ_RESULT value.

Parameters

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

sWord

The word to retrieve pronunciation for.

sSRPhones

The returned speech recognition pronunciation string.

sSSPhones

The returned speech synthesis phoneme string.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

initialize

- (BZ_RESULT)initialize

Discussion

Initializes BZMediaController instance of the class. This method must be called before any other methods of the interface are called.

Method returns a BZ_RESULT value.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

initializeAudioPlayer

- (BZ_RESULT)initializeAudioPlayer

Discussion

Initializes the audio player module. This method must be called before calling other methods that require functionlity such as audio playback.

Method returns a BZ_RESULT value.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

initializeAudioRecorder

- (BZ_RESULT)initializeAudioRecorder

Discussion

Initializes the audio recorder module. This method must be called before calling other methods that require functionlity such as audio recording and speech recognition.

Method returns a BZ_RESULT value.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

initializeSREngine:languageCode:

- (BZ_RESULT)initializeSREngine:(BZSREngine)eSREngine languageCode:(NSString *)sLanguageCode

Discussion

Initializes a speech recognition engine. A speech recognizer engine must be initialized before methods that require speech recognition from that engine are called. eSREngine must be specified.

Method returns a BZ_RESULT value.

Parameters

eSREngine

The speech recognizer engine to use for speech recognition. Speech recognizer engine options are defined in BZSREngine.

sLanguageCode

The language for speech recognizer to recognize. Apple SR supports speech reocgnition for many languages. Example: “en-us” for american english.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

initializeSSEngine:voiceName:languageCode:voiceQuality:

- (BZ_RESULT)initializeSSEngine:(BZSSEngine)eSSEngine voiceName:(NSString *)sVoiceName languageCode:(NSString *)sLanguageCode voiceQuality:(NSString *)sVoiceQuality

Discussion

Initializes a speech synthesizer engine. A speech synthesizer engine must be initialized before methods that require speech synthesis from that engine are called. eSSEngine must be specified. A speech synthesizer voice is selected dependent on the other parameters which may or may not be specified.

Method returns a BZ_RESULT value.

Parameters

eSSEngine

The speech synthesizer engine to use for speech synthesis. Speech synthesizer engine options are defined in BZSSEngine.

sVoiceName

The voice name to be selected by the speech synthesizer. Example for Apple SS: Samantha. Example for Flite SS: slt-hts.
For Apple SS, to find all voices on an apple mobile device, navigate to Settings–>Accessibility–>Spoken Content–>Voices and download the desired voice if not already downloaded.
For Flite SS, the following voices are available: “slt”, “rms”, “kal16”, “awb”, “time_awb”, “bdl-flitevox”, “jmk-flitevox”, “slt-hts” and “crts-hts”.

sLanguageCode

The language the voice can speak. Apple SS supports many languages through the selection of the voice. Example: “en-us” for american english.

sVoiceQuality

The quality of the voice. For Apple SS. Options are: “standard”, “enhanced” and “premium”.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

isAECEnabled

- (BOOL)isAECEnabled

Discussion

Retrieves whether acoustic echo cancelation is enabled or not.

Method returns a BOOL value.

Return Value

A BOOL value.

Declared In

BZMediaController.h

isVADEnabled

- (BOOL)isVADEnabled

Discussion

Retrieves whether voice activity detection is enabled or not.

Method returns a BOOL value.

Return Value

A BOOL value.

Declared In

BZMediaController.h

loadCustomDictionary:dictFile:

- (BZ_RESULT)loadCustomDictionary:(BZSREngine)eSREngine dictFile:(NSString *)sDictFile

Discussion

Applies to PocketSphinx SR only. Loads custom dictionary of words and their corresponding pronunciations (phonemes) for the speech recognizer to recognize the words differently or more accurately. A file pathname URL containing the custom dictionary is used to pass the custom dictionary entries to the speech recognizer.

Example of custom dictionary entries in file:
back B AE K
forward F AO R W ER D
full F UH L
half HH AE F

Method returns a BZ_RESULT value.

Parameters

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

sDictFile

The file pathname URL containing the custom dictionary entries.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

loadCustomWordListIntoDictionary:custDictList:

- (BZ_RESULT)loadCustomWordListIntoDictionary:(BZSREngine)eSREngine custDictList:(NSArray *)aCustomDictList

Discussion

Applies to PocketSphinx SR only. Loads custom dictionary of words and their corresponding pronunciations (phonemes) for the speech recognizer to recognize the words differently or more accurately. An array containing the custom dictionary is used to pass the custom dictionary entries to the speech recognizer.

Example of custom dictionary entries in an array:
back B AE K
forward F AO R W ER D
full F UH L
half HH AE F

Method returns a BZ_RESULT value.

Parameters

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

aCustomDictList

The array containing the custom dictionary entries.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

loadSRTask:srTask:

- (BZ_RESULT)loadSRTask:(BZSREngine)eSREngine srTask:(BZSRTask *)SRTask

Discussion

Loads a speech recognition task as defined in BZSRTask.

Method returns a BZ_RESULT value.

Parameters

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

SRTask

The speech recognition task to load as defined in BZSRTask.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

loadSSLexicon:fromLexiconFile:

- (BZ_RESULT)loadSSLexicon:(BZSSEngine)eSSEngine fromLexiconFile:(NSString *)sLexiconPathFile

Discussion

Applies to Flite SS only. Loads custom speech synthesis lexicon entries from a file. Example of entries in speech synthesis lexicon file:
sleekit: s l iy1 k ih0 t
trochled : t r ao1 k ax0 l d
mounir : m uw0 n iy1 r

Method returns a BZ_RESULT value.

Parameters

eSSEngine

The speech synthesizer engine initialized for speech synthesis. Speech synthesizer engine options are defined in BZSSEngine.

sLexiconPathFile

The file pathname URL for the lexicon file.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

loadSSLexicon:fromLexiconList:

- (BZ_RESULT)loadSSLexicon:(BZSSEngine)eSSEngine fromLexiconList:(NSArray *)aLexiconList

Discussion

Applies to Flite SS only. Loads custom speech synthesis lexicon entries from an array. Example of array entries:
sleekit: s l iy1 k ih0 t
trochled : t r ao1 k ax0 l d
mounir : m uw0 n iy1 r

Method returns a BZ_RESULT value.

Parameters

eSSEngine

The speech synthesizer engine initialized for speech synthesis. Speech synthesizer engine options are defined in BZSSEngine.

aLexiconList

The array containing the speech synthesizer custom lexicon entries.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

playAudio:ssEngine:audioSegment:audioPlayParams:lastAudioSegmentInCollection:

- (BZ_RESULT)playAudio:(NSString *)sMediaJobID ssEngine:(BZSSEngine)eSSEngine audioSegment:(BZAudioSegment *)AudioSegment audioPlayParams:(BZAudioPlayParams *)AudioPlayParams lastAudioSegmentInCollection:(BOOL)bLastAudioSegmentInCollection

Discussion

Provides audio playback for an audio segment. Audio segment can be a recorded audio file or real-time synthesized speech provided by a speech synthesizer for text. This method executes asynchronously when the method returns BZ_SUCCESS.

Method returns a BZ_RESULT value.

Parameters

sMediaJobID

The ID of a media job assigned by the application to the execution of the play audio task. Client will receive this media job ID with all event notifications and callbacks associated with the play audio task.

eSSEngine

The speech synthesizer engine to use for speech synthesis if the audio segment references text to be speech synthesized. Speech synthesizer engine options are defined in BZSSEngine. This value of this parameter is ignored if audio segment references a pre-recorded audio file.

AudioSegment

The audio segment to process for audio playback as defined in BZAudioSegment.

AudioPlayParams

The paramaters for audio playback as defined in BZAudioPlayParams.

bLastAudioSegmentInCollection

This parameter tells the media framework whether this audio segment is the last audio segment to be played as part of a collection of audio segments. Audio recording and speech recognition that are active during audio playback need to know whehter an audio segment finishing audio playback is the last audio segment or not.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

recognizeFileAudio:srEngine:srTaskID:srTaskRule:utteranceFile:audioPlayParams:audioRecordParams:srParams:saveAudioFileParams:

- (BZ_RESULT)recognizeFileAudio:(NSString *)sMediaJobID srEngine:(BZSREngine)eSREngine srTaskID:(NSString *)sSRTaskID srTaskRule:(NSString *)sSRTaskRule utteranceFile:(NSString *)sUtteranceFile audioPlayParams:(BZAudioPlayParams *)AudioPlayParams audioRecordParams:(BZAudioRecordParams *)AudioRecordParams srParams:(BZSREngineParams *)SREngineParams saveAudioFileParams:(BZSaveAudioFileParams *)SaveAudioFileParams

Discussion

Provides speech recognition on audio data obtained from a pre-recorded audio utterance file. The execution of this speech recognition task includes real-time streaming of audio data samples from a file to a speech recognizer, and with that, it simulates the execution of recognizeLiveAudio method which streams live audio data samples from an audio input source on a device. This method executes asynchronously when the method returns BZ_SUCCESS.

Method returns a BZ_RESULT value.

Parameters

sMediaJobID

The ID of a media job assigned by the application to the execution of the speech recognition task. Client will receive this media job ID with all event notifications and callbacks associated with the speech recognition task.

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

sSRTaskID

The speech recognition task ID obtained from the m_strTaskID parameter of a loaded task configured in a BZSRTask object.

sSRTaskRule

Pocket Sphinx SR only. This parameter contains the speech recognition task rule to load and execute. Default: nil.

sUtteranceFile

The audio file pathname URL of the utterence containing the audio to send to the speech recognizer.

AudioPlayParams

The paramaters for playback of audio data in sUtteranceFile to the speech recognizer as defined in BZAudioPlayParams.

AudioRecordParams

The paramaters for audio recording as defined in BZAudioRecordParams. Speech recognition on file audio utilizes audio recording to collect audio from the audio playback of sUtteranceFile. AudioRecordParams provide granular management over the speech recognition session.

SREngineParams

The paramaters for the speech recognition engine as defined in BZSREngineParams.

SaveAudioFileParams

The parameters for optionally collecting and storing speech recognition audio utterances in files.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

recognizeFileAudioOffline:srEngine:srTaskID:srTaskRule:utteranceFile:srParams:srResults:

- (BZ_RESULT)recognizeFileAudioOffline:(NSString *)sMediaJobID srEngine:(BZSREngine)eSREngine srTaskID:(NSString *)sSRTaskID srTaskRule:(NSString *)sSRTaskRule utteranceFile:(NSString *)sUtteranceFile srParams:(BZSREngineParams *)SREngineParams srResults:(NSMutableDictionary *)dictSRResults

Discussion

Provides offline speech recognition on audio data obtained from a pre-recorded audio utterance file. The method performs offline speech recognition on audio samples read directly from an utternace without real-time audio streaming. Pocket Sphinx SR completes the speech recognition synchronously whereas Apple SR completes the speech recognition task asynchronously. Both Pocket Sphinx SR and Apple SR send an event notification to the application with the speech recognition result after the speech recognition task is complete, and with that, representing the end of the speech recogniotiuon task.This method executes asynchronously when the method returns BZ_SUCCESS.

Method returns a BZ_RESULT value.

Parameters

sMediaJobID

The ID of a media job assigned by the application to the execution of the speech recognition task. Client will receive this media job ID with all event notifications and callbacks associated with the speech recognition task.

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

sSRTaskID

The speech recognition task ID obtained from the m_strTaskID parameter of a loaded task configured in a BZSRTask object.

sSRTaskRule

Pocket Sphinx SR only. This parameter contains the speech recognition task rule to load and execute. Default: nil.

sUtteranceFile

The audio file pathname URL of the utterence containing the audio to send to the speech recognizer.

SREngineParams

The paramaters for the speech recognition engine as defined in BZSREngineParams.

dictSRResults

Pocket Sphinx SR only. The dictionary that will hold the speech recognition result. Pocket Sphinx SR completes the speech recognition task synchronously, and if this parameter is not nil, then Pocket Sphinx SR fills this parameter with the speech recognition result. Apple SR completes the speech recognition task asynchronously and so it ignores this parameter. Both Pocket Sphinx SR and Apple SR send an event notification to the application with the speech recognition result after the speech recognition task is complete.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

recognizeLiveAudio:srEngine:srTaskID:srTaskRule:audioRecordParams:srParams:saveAudioFileParams:

- (BZ_RESULT)recognizeLiveAudio:(NSString *)sMediaJobID srEngine:(BZSREngine)eSREngine srTaskID:(NSString *)sSRTaskID srTaskRule:(NSString *)sSRTaskRule audioRecordParams:(BZAudioRecordParams *)AudioRecordParams srParams:(BZSREngineParams *)SREngineParams saveAudioFileParams:(BZSaveAudioFileParams *)SaveAudioFileParams

Discussion

Provides speech recognition on live audio data obtained from an audio input source on a device. This method executes asynchronously when the method returns BZ_SUCCESS.

Method returns a BZ_RESULT value.

Parameters

sMediaJobID

The ID of a media job assigned by the application to the execution of the speech recognition task. Client will receive this media job ID with all event notifications and callbacks associated with the speech recognition task.

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

sSRTaskID

The speech recognition task ID obtained from the m_strTaskID parameter of a loaded task configured in a BZSRTask object.

sSRTaskRule

Pocket Sphinx SR only. This parameter contains the speech recognition task rule to load and execute. Default: nil.

AudioRecordParams

The paramaters for audio recording as defined in BZAudioRecordParams. Speech recognition on live audio utilizes audio recording to collect audio from an audio input source on a device. AudioRecordParams provide granular management over the speech recognition session.

SREngineParams

The paramaters for the speech recognition engine as defined in BZSREngineParams.

SaveAudioFileParams

The parameters for optionally collecting and storing speech recognition audio utterances in files.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

recordFileAudio:audioSegmentSrc:audioSegmentDest:audioPlayParams:audioRecordParams:

- (BZ_RESULT)recordFileAudio:(NSString *)sMediaJobID audioSegmentSrc:(BZAudioSegment *)AudioSegmentSrc audioSegmentDest:(BZAudioSegment *)AudioSegmentDest audioPlayParams:(BZAudioPlayParams *)AudioPlayParams audioRecordParams:(BZAudioRecordParams *)AudioRecordParams

Discussion

Provides audio recording from an audio segment source to an audio segment destination. This method executes asynchronously when the method returns BZ_SUCCESS.

Method returns a BZ_RESULT value.

Parameters

sMediaJobID

The ID of a media job assigned by the application to the execution of the audio recording task. Client will receive this media job ID with all event notifications and callbacks associated with the audio recording task.

AudioSegmentSrc

The audio segment used as the source of played audio data to be recorded. “m_AudioSegmentType” parameter in BZAudioSegment can be set to any BZAudioSegmentType value.

AudioSegmentDest

The audio segment used to save the collected recorded audio, as defined in BZAudioSegment. “m_AudioSegmentType” parameter in BZAudioSegment must be set to AST_AUDIOFILE.

AudioPlayParams

The paramaters for playback of audio data in AudioSegmentSrc as defined in BZAudioPlayParams.

AudioRecordParams

The paramaters for audio recording as defined in BZAudioRecordParams.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

recordLiveAudio:audioSegment:audioRecordParams:

- (BZ_RESULT)recordLiveAudio:(NSString *)sMediaJobID audioSegment:(BZAudioSegment *)AudioSegment audioRecordParams:(BZAudioRecordParams *)AudioRecordParams

Discussion

Provides audio recording from an audio input source on a device.The audio data is saved into an audio segment. This method executes asynchronously when the method returns BZ_SUCCESS.

Method returns a BZ_RESULT value.

Parameters

sMediaJobID

The ID of a media job assigned by the application to the execution of the audio recording task. Client will receive this media job ID with all event notifications and callbacks associated with the audio recording task.

AudioSegment

The audio segment used to save the collected recorded audio, as defined in BZAudioSegment. “m_AudioSegmentType” parameter in BZAudioSegment must be set to AST_AUDIOFILE.

AudioRecordParams

The paramaters for audio recording as defined in BZAudioRecordParams.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

releaseAudioPlayer

- (BZ_RESULT)releaseAudioPlayer

Discussion

Releases the audio player module.

Method returns a BZ_RESULT value.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

releaseAudioRecorder

- (BZ_RESULT)releaseAudioRecorder

Discussion

Releases the audio recorder module.

Method returns a BZ_RESULT value.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

releaseSREngine:

- (BZ_RESULT)releaseSREngine:(BZSREngine)eSREngine

Discussion

Releases the speech recognizer engine.

Method returns a BZ_RESULT value.

Parameters

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

releaseSSEngine:

- (BZ_RESULT)releaseSSEngine:(BZSSEngine)eSSEngine

Discussion

Releases the speech synthesizer engine.

Method returns a BZ_RESULT value.

Parameters

eSSEngine

The speech synthesizer engine. Speech synthesizer engine options are defined in BZSSEngine.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

requestMicrophonePermission

- (BZ_RESULT)requestMicrophonePermission

Discussion

Requests permission for application to use device microphone in order to collect audio from the microphone. If the permission for the application has not yet been granted or denied, the media framework returns the permission decision asynchronously through a media noitification event to the application.

Method returns a BZ_RESULT value:
- BZ_PERMISSION_GRANTED or BZ_PERMISSION DENIED if the permission has been previously granted or denied.
- BZ_PERMISSION_WAIT indicating that the permission to use the microphone is being presented to the application user. User’s decision to grant or deny microphone usage is sent to the application through a notification event.
- Otherwise, another BZ_RESULT value.

Return Value

BZ_PERMISSION_GRANTED, BZ_PERMISSION DENIED or BZ_PERMISSION_WAIT if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

requestSpeechRecognitionPermission

- (BZ_RESULT)requestSpeechRecognitionPermission

Discussion

Requests permission for application to use speech recognition on collected audio data. If the permission for the application has not yet been granted or denied, the media framework returns the permission decision asynchronously through a media noitification event to the application.

Method returns a BZ_RESULT value:
- BZ_PERMISSION_GRANTED or BZ_PERMISSION DENIED if the permission has been previously granted or denied.
- BZ_PERMISSION_WAIT indicating that the permission to use speech recognition is being presented to the application user. User’s decision to grant or deny speech recognition is sent to the application through a notification event.
- Otherwise, another BZ_RESULT value.

Return Value

BZ_PERMISSION_GRANTED, BZ_PERMISSION DENIED or BZ_PERMISSION_WAIT if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

routeDeviceAudioOutput:

- (BZ_RESULT)routeDeviceAudioOutput:(BZAudioSessionOutputRoute)outputRoute

Discussion

Routes audio playback to a specific audio output destination on a device. Example is to route audio to a device internal speaker or to the device external speaker.

Method returns a BZ_RESULT value.

Parameters

outputRoute

The audio session output route parameters as defined in BZAudioSessionOutputRoute.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

runAEC:renderFile:captureFile:resultFile:renderAudioPlayParams:captureAudioPlayParams:resultAudioRecordParams:

- (BZ_RESULT)runAEC:(NSString *)sMediaJobID renderFile:(NSString *)sRenderPathFile captureFile:(NSString *)sCapturePathFile resultFile:(NSString *)sResutPathFile renderAudioPlayParams:(BZAudioPlayParams *)renderParams captureAudioPlayParams:(BZAudioPlayParams *)captureParams resultAudioRecordParams:(BZAudioRecordParams *)resultParams

Discussion

Provides the capability to run offline acoustic acoustic cancelation on a pre-recorded audio file containing acoustic echo generated from audio playback. This method executes asynchronously when the method returns BZ_SUCCESS.

Method returns a BZ_RESULT value.

Parameters

sMediaJobID

The ID of a media job assigned by the application to the execution of the acoustic echo cancelation task. Client will receive this media job ID with all event notifications and callbacks associated with the acoustic echo cancelation task.

sRenderPathFile

The audio file pathname URL containing the audio used for audio playback on a device.

sCapturePathFile

The audio file pathname URL containing the audio recorded when audio playback was active on a device. This recorded audio contains the acoustic echo generated by the audio playback on the device.

sResutPathFile

The audio file pathname URL that will contian the result audio data with canceled acoustic echo after this method completes execution.

renderParams

The paramaters for offline playback of audio data in sRenderPathFile as defined in BZAudioPlayParams.

captureParams

The paramaters for offline playback of audio data in sCapturePathFile as defined in BZAudioPlayParams.

resultParams

The paramaters for offline audio recording of the result echo canceled audio data as defined in BZAudioRecordParams.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

selectSSVoice:voiceID:

- (BZ_RESULT)selectSSVoice:(BZSSEngine)eSSEngine voiceID:(NSString *)sVoiceID

Discussion

Selects a specific voice from a speech synthesizer engine using the voice ID. A speech synthesizer engine must be initialized before this method can be called. eSSEngine must be specified.

Method returns a BZ_RESULT value.

Parameters

eSSEngine

The speech synthesizer engine initialized for speech synthesis. Speech synthesizer engine options are defined in BZSSEngine.

sVoiceID

The voice ID to be selected by the speech synthesizer. Example for Apple SS: “com.apple.ttsbundle.Samantha-compact”. Example for Flite SS: “slt-hts”.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

selectSSVoice:voiceName:languageCode:voiceQuality:

- (BZ_RESULT)selectSSVoice:(BZSSEngine)eSSEngine voiceName:(NSString *)sVoiceName languageCode:(NSString *)sLanguageCode voiceQuality:(NSString *)sVoiceQuality

Discussion

Selects a specific voice from a speech synthesizer engine. A speech synthesizer engine must be initialized before this method can be called. eSSEngine must be specified. A speech synthesizer voice is selected dependent on the other parameters which may or may not be specified.

Method returns a BZ_RESULT value.

Parameters

eSSEngine

The speech synthesizer engine initialized for speech synthesis. Speech synthesizer engine options are defined in BZSSEngine.

sVoiceName

The voice name to be selected by the speech synthesizer. Example for Apple SS: Samantha. Example for Flite SS: slt-hts.
For Apple SS, to find all voices on an apple mobile device, navigate to Settings–>Accessibility–>Spoken Content–>Voices and download the desired voice if not already downloaded.
For Flite SS, the following voices are available: “slt”, “rms”, “kal16”, “awb”, “time_awb”, “bdl-flitevox”, “jmk-flitevox”, “slt-hts” and “crts-hts”.

sLanguageCode

The language the voice can speak. Apple SS supports many languages through the selection of the voice. Example: “en-us” for american english.

sVoiceQuality

The quality of the voice. For Apple SS. Options are: “standard”, “enhanced” and “premium”.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

setAECParams:

- (BZ_RESULT)setAECParams:(BZAECParams *)AECParams

Discussion

Configures the acoustic echo cancelation parameters as defined in BZAECParams.

Method returns a BZ_RESULT value.

Parameters

AECParams

The acoustic echo cancelation parameters as defined in BZAECParams.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

setLogLevel:

- (void)setLogLevel:(NSString *)logLevel

Discussion

Sets the logging level for a BZMediaController object.
Log level can be set to one of the following values: “none”, “fault”, “error”, “default”, “info”, “debug” and “verbose”.
Default log level is “default” which includes enabled logging for log levels “fault” and “error”.

Parameters

logLevel

The log level as a string value.

Declared In

BZMediaController.h

setModulesLogLevels:

- (void)setModulesLogLevels:(NSDictionary *)logLevels

Discussion

Sets the logging level for the media modules in the media framework.
Media modules have the following types: “MediaController”, “MediaEngine”, “MediaEngineWrapper”, “MediaPermissions”, “AudioSession”, “AudioRecorder”, “AudioFileRecorder”, “AudioPlayer”, “PocketSphinxSR”, “AppleSR”, “FliteSS”, “AppleSS” and “AudioStreamer”.
Log level can be set to one of the following values: “none”, “fault”, “error”, “default”, “info”, “debug” and “verbose”. Each media module can have its own log level.
Default log level for all media modules is “default” which includes enabled logging for log levels “fault” and “error”.

Parameters

logLevels

A dictionary containing key/value pairs where key represents the type of the media module and the value represents the log level for the media module.

Declared In

BZMediaController.h

setVADParams:

- (BZ_RESULT)setVADParams:(BZVADParams *)VADParams

Discussion

Configures the voice activity detection parameters as defined in BZVADParams.

Method returns a BZ_RESULT value.

Parameters

VADParams

The voice activity detection parameters as defined in BZVADParams.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

setVoiceFlowFmwkInfo:build:data:

- (BZ_RESULT)setVoiceFlowFmwkInfo:(NSString *)sVersion build:(NSString *)sBuild data:(NSData *)authData

Discussion

This method is reserved and should not be called.

Method returns a BZ_RESULT value.

Parameters

sVersion

The version.

sBuild

The build.

authData

The authentication data.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

stopPlayAudio

- (BZ_RESULT)stopPlayAudio

Discussion

Instructs media framework to stop audio playback before audio playback completes. This method executes asynchronously when the method returns BZ_SUCCESS.

Method returns a BZ_RESULT value.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

stopRecognizeAudio:

- (BZ_RESULT)stopRecognizeAudio:(BZSREngine)eSREngine

Discussion

Instructs media framework to stop speech recognition before speech recognition completes. This method executes asynchronously when the method returns BZ_SUCCESS.

Method returns a BZ_RESULT value.

Parameters

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

stopRecordAudio

- (BZ_RESULT)stopRecordAudio

Discussion

Instructs media framework to stop audio recording before audio recording completes. This method executes asynchronously when the method returns BZ_SUCCESS.

Method returns a BZ_RESULT value.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

unloadAllSRTasks:

- (BZ_RESULT)unloadAllSRTasks:(BZSREngine)eSREngine

Discussion

Unloads all speech recognition tasks that have been loaded.

Method returns a BZ_RESULT value.

Parameters

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h

unloadSRTask:srTaskID:

- (BZ_RESULT)unloadSRTask:(BZSREngine)eSREngine srTaskID:(NSString *)sSRTaskID

Discussion

Unloads a speech recognition task identified by the m_strTaskID parameter value of a loaded task configured in a BZSRTask object.

Method returns a BZ_RESULT value.

Parameters

eSREngine

The speech recognizer engine. Speech recognizer engine options are defined in BZSREngine.

sSRTaskID

The speech recognition task ID obtained from the m_strTaskID parameter of a loaded task configured in a BZSRTask object.

Return Value

BZ_SUCCESS if successul. Otherwise, another BZ_RESULT value.

Declared In

BZMediaController.h