| class CSISpeechRecognitionUtility : public CBase |
This is the main class of Speech Recognition Utility
| Private Member Functions | |
|---|---|
| CSISpeechRecognitionUtility ( MSISpeechRecognitionUtilityObserver &) | |
| CSISpeechRecognitionUtility () | |
| void | ConstructL ( TUid , TUid , MSISpeechRecognitionUtilityObserver &) |
| CSISpeechRecognitionUtility | ( | MSISpeechRecognitionUtilityObserver & | aSpeechRecognitionUtilityObserver | ) | [private] |
Private C++ constructor for this class.
| MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver | reference to event observer class |
| IMPORT_C TInt | ActivateGrammar | ( | TSIGrammarID | aGrammarID | ) |
Reactivates a previously deactivated grammar.
| TSIGrammarID aGrammarID | grammar ID |
| IMPORT_C TInt | Adapt | ( | const CSIClientResultSet & | aResultSet, |
| TInt | aCorrect | |||
| ) | ||||
Adapts the speaker independent models to a specific speaker's voice.
| const CSIClientResultSet & aResultSet | Recognition result N-Best |
| TInt aCorrect | Index to N-Best pointing the correct result. |
| IMPORT_C TInt | AddPronunciation | ( | TSILexiconID | aLexiconID, |
| const TDesC & | aTextForTraining, | |||
| TLanguage | aLanguage, | |||
| TSIPronunciationID & | aPronunciationID | |||
| ) | ||||
Adds a new pronunciation for the given text phrase into the specified lexicon.
| TSILexiconID aLexiconID | lexicon Id, where the new pronunciation is added to aTextForTraining Text to be trained aLanguage Pronunciation language aPronunciationID reference where a new pronunciation Id is assigned to |
| const TDesC & aTextForTraining | |
| TLanguage aLanguage | |
| TSIPronunciationID & aPronunciationID |
| IMPORT_C TInt | AddRule | ( | TSIGrammarID | aGrammarID, |
| TSILexiconID | aLexiconID, | |||
| TSIPronunciationID | aPronunciationID, | |||
| TSIRuleID & | aRuleID | |||
| ) | ||||
Adds a new rule for the given pronunciation into the specified grammar.
| TSIGrammarID aGrammarID | grammar Id, where the new rule is added to |
| TSILexiconID aLexiconID | lexicon Id |
| TSIPronunciationID aPronunciationID | pronunciation Id |
| TSIRuleID & aRuleID | reference where a new rule Id is assigned to |
| IMPORT_C TInt | AddRuleVariant | ( | TSIGrammarID | aGrammarID, |
| TSILexiconID | aLexiconID, | |||
| RArray < TSIPronunciationID > & | aPronunciationIDs, | |||
| TSIRuleID | aRuleID, | |||
| TSIRuleVariantID & | aRuleVariantID | |||
| ) | ||||
Adds a new rule variant for the given pronunciation into the specified grammar.
| TSIGrammarID aGrammarID | grammar Id, where the new rule is added to |
| TSILexiconID aLexiconID | |
| RArray < TSIPronunciationID > & aPronunciationIDs | the phrase is the concatenation of these pronunciation IDs |
| TSIRuleID aRuleID | the rule Id, which will contain this variant |
| TSIRuleVariantID & aRuleVariantID | reference where a new rule variant Id is assigned to |
| IMPORT_C TInt | AddVoiceTag | ( | MDesCArray & | aTextArray, |
| const RArray < TLanguage > & | aLanguageArray, | |||
| TSILexiconID | aLexiconID, | |||
| TSIGrammarID | aGrammarID, | |||
| TSIRuleID & | aRuleID | |||
| ) | ||||
Adds a new rule for the given phrase into the specified grammar.
| MDesCArray & aTextArray | the text to be trained, divided in to words. The phrase is the concatenation of these words. |
| const RArray < TLanguage > & aLanguageArray | pronunciations will be generated for these languages |
| TSILexiconID aLexiconID | lexicon, where to add pronunciations |
| TSIGrammarID aGrammarID | grammar, where to add rules |
| TSIRuleID & aRuleID | the ID of the rule will be placed on this variable. |
| IMPORT_C TInt | AddVoiceTag | ( | MDesCArray & | aTextArray, |
| const RArray < RLanguageArray > & | aLanguageArray, | |||
| TSILexiconID | aLexiconID, | |||
| TSIGrammarID | aGrammarID, | |||
| TSIRuleID & | aRuleID | |||
| ) | ||||
Adds a new rule for the given phrase into the specified grammar.
| MDesCArray & aTextArray | The text to be trained, divided in to words. The phrase is the concatenation of these words. |
| const RArray < RLanguageArray > & aLanguageArray | Pronunciations will be generated for these languages |
| TSILexiconID aLexiconID | Lexicon, where to add pronunciations |
| TSIGrammarID aGrammarID | Grammar, where to add rules |
| TSIRuleID & aRuleID | The ID of the rule will be placed on this variable. |
| IMPORT_C TInt | AddVoiceTags | ( | const RPointerArray < MDesCArray > & | aTextArrayArray, |
| const RArray < TLanguage > & | aLanguageArray, | |||
| TSILexiconID | aLexiconID, | |||
| TSIGrammarID | aGrammarID, | |||
| RArray < TSIRuleID > & | aRuleIDArray | |||
| ) | ||||
Adds a new rules for the given phrases into the specified grammar.
| const RPointerArray < MDesCArray > & aTextArrayArray | Array of text arrays. The phrase k is the concatenation of texts in array k. |
| const RArray < TLanguage > & aLanguageArray | pronunciations will be generated for these languages |
| TSILexiconID aLexiconID | lexicon, where to add pronunciations |
| TSIGrammarID aGrammarID | grammar, where to add rules |
| RArray < TSIRuleID > & aRuleIDArray |
| IMPORT_C TInt | AddVoiceTags | ( | const RPointerArray < MDesCArray > & | aTextArrayArray, |
| const RArray < RLanguageArray > & | aLanguageArray, | |||
| TSILexiconID | aLexiconID, | |||
| TSIGrammarID | aGrammarID, | |||
| RArray < TSIRuleID > & | aRuleIDArray | |||
| ) | ||||
Adds a new rules for the given phrases into the specified grammar.
| const RPointerArray < MDesCArray > & aTextArrayArray | Array of text arrays. The phrase k is the concatenation of texts in array k. |
| const RArray < RLanguageArray > & aLanguageArray | pronunciations will be generated for these languages |
| TSILexiconID aLexiconID | lexicon, where to add pronunciations |
| TSIGrammarID aGrammarID | grammar, where to add rules |
| RArray < TSIRuleID > & aRuleIDArray |
| IMPORT_C TInt | CommitChanges | ( | ) |
Saves the changes into a permanent storage.
| void | ConstructL | ( | TUid | aClientUid, |
| TUid | aPluginUid, | |||
| MSISpeechRecognitionUtilityObserver & | aObserver | |||
| ) | [private] | |||
Second phase constructor for this class.
| TUid aClientUid | Client UID for data ownership, other clients won't be able to modify the data registered to certain client |
| TUid aPluginUid | UID of the plugin which will be used, KNullUid to search for suitable plugin |
| MSISpeechRecognitionUtilityObserver & aObserver | Callback observer reference |
| IMPORT_C TInt | CreateGrammar | ( | TSIGrammarID & | aGrammarID | ) |
Creates a new grammar.
| TSIGrammarID & aGrammarID | reference where grammar ID is stored |
| IMPORT_C void | CreateInstanceSecondPhaseL | ( | TUid | aClientUid, |
| TUid | aPluginUid, | |||
| MSISpeechRecognitionUtilityObserver & | aObserver | |||
| ) | ||||
Second phase of construction after CreateInstanceL call. Needed when dynamically loading nsssispeechrecognitionutility.dll Direct users of CSISpeechRecognitionUtility should not use this.
| TUid aClientUid | Client UID for data ownership, other clients won't be able to modify the data registered to certain client |
| TUid aPluginUid | UID of the plugin which will be used, KNullUid to search for suitable plugin |
| MSISpeechRecognitionUtilityObserver & aObserver | Callback observer reference |
| IMPORT_C TInt | CreateLexicon | ( | TSILexiconID & | aLexiconID | ) |
Creates a new lexicon.
| TSILexiconID & aLexiconID | reference where lexicon ID is stored |
| IMPORT_C TInt | CreateModelBank | ( | TSIModelBankID & | aModelBankID | ) |
Creates a new model bank.
| TSIModelBankID & aModelBankID | reference where a new model bank Id is assigned to |
| IMPORT_C TInt | CreateRule | ( | TSIGrammarID | aGrammarID, |
| TSIRuleID & | aRuleID | |||
| ) | ||||
Creates a new rule.
| TSIGrammarID aGrammarID | grammar, where the new rule is to be added |
| TSIRuleID & aRuleID | reference where rule ID is stored |
| IMPORT_C TInt | DeactivateGrammar | ( | TSIGrammarID | aGrammarID | ) |
Deactivates a loaded grammar, so that it is not recognized.
| TSIGrammarID aGrammarID | grammar ID |
| IMPORT_C TInt | EndRecSession | ( | ) |
Ends the current recognition session. Resources allocated for recognition are freed.
| IMPORT_C TInt | EndRecord | ( | ) |
Stops the recording. The difference with Cancel is that if enough samples were recorded, a recognition result will be produced.
| IMPORT_C TInt | GetAllClientGrammarIDs | ( | RArray < TSIGrammarID > & | aGrammarIDs | ) |
Returns all grammar Ids that belong to the current client.
| RArray < TSIGrammarID > & aGrammarIDs | reference where grammar Ids are stored |
| IMPORT_C TInt | GetAllClientLexiconIDs | ( | RArray < TSILexiconID > & | aLexiconIDs | ) |
Returns all lexicon Ids that belong to the current client.
| RArray < TSILexiconID > & aLexiconIDs | reference where lexicon Ids are stored |
| IMPORT_C TInt | GetAllClientModelBankIDs | ( | RArray < TSIModelBankID > & | aModelBankIDs | ) |
| RArray < TSIModelBankID > & aModelBankIDs | reference where model bank Ids are stored |
| IMPORT_C TInt | GetAllGrammarIDs | ( | RArray < TSIGrammarID > & | aGrammarIDs | ) |
Returns all grammar Ids that exist (for all clients).
| RArray < TSIGrammarID > & aGrammarIDs | reference where grammar Ids are stored |
| IMPORT_C TInt | GetAllLexiconIDs | ( | RArray < TSILexiconID > & | aLexiconIDs | ) |
Returns all lexicon Ids that exist (for all clients).
| RArray < TSILexiconID > & aLexiconIDs | reference where lexicon Ids are stored |
| IMPORT_C TInt | GetAllModelBankIDs | ( | RArray < TSIModelBankID > & | aModelBankIDs | ) |
Returns all model bank Ids that exist (for all clients).
| RArray < TSIModelBankID > & aModelBankIDs | reference where model bank Ids are stored |
| IMPORT_C TInt | GetAllModelIDs | ( | TSIModelBankID | aModelBankID, |
| RArray < TSIModelID > & | aModelIDs | |||
| ) | ||||
Returns all model Ids that exist in the specified model bank.
| TSIModelBankID aModelBankID | model bank Id aModelIDs reference where model Ids are stored |
| RArray < TSIModelID > & aModelIDs |
| IMPORT_C TInt | GetAllPronunciationIDs | ( | TSILexiconID | aLexiconID, |
| RArray < TSIPronunciationID > & | aPronunciationIDs | |||
| ) | ||||
Returns all pronunciation Ids that exist in the specified lexicon.
| TSILexiconID aLexiconID | lexicon Id aPronunciationIDs reference where pronunciation Ids are stored |
| RArray < TSIPronunciationID > & aPronunciationIDs |
| IMPORT_C TInt | GetAllRuleIDs | ( | TSIGrammarID | aGrammarID, |
| RArray < TSIRuleID > & | aRuleIDs | |||
| ) | ||||
Returns all rule Ids that exist in the specified grammar.
| TSIGrammarID aGrammarID | grammar Id aRuleIDs reference where rule Ids are stored |
| RArray < TSIRuleID > & aRuleIDs |
| IMPORT_C TInt | GetEngineProperties | ( | const RArray < TInt > & | aPropertyId, |
| RArray < TInt > & | aPropertyValue | |||
| ) | ||||
Returns the engine properties specified by the engine property ID array. On return aPropertyValue contains an array of engine properties.
| IMPORT_C TInt | GetModelCount | ( | TSIModelBankID | aModelBankID, |
| TInt & | aModelCount | |||
| ) | ||||
| TSIModelBankID aModelBankID | model bank Id |
| TInt & aModelCount |
| IMPORT_C TInt | GetRuleValidity | ( | TSIGrammarID | aGrammarID, |
| TSIRuleID | aRuleID, | |||
| TBool & | aValid | |||
| ) | ||||
Checks if the rule is valid or not.
| TSIGrammarID aGrammarID | grammar Id aRuleID rule Id aValid reference where the validity of the rule is set |
| TSIRuleID aRuleID | |
| TBool & aValid |
| void | HandleEvent | ( | const TMMFEvent & | aEvent | ) |
From MSISpeechRecognitionUtilityObserver
| const TMMFEvent & aEvent | event code indicating what asynchronous event occurred |
| IMPORT_C TInt | LoadEngineParameters | ( | const RArray < TInt > & | aParameterId, |
| const RArray < TInt > & | aParameterValue | |||
| ) | ||||
Uploads the specified parameters into the engine.
| IMPORT_C TInt | LoadGrammar | ( | TSIGrammarID | aGrammarID | ) |
Loads the specified grammar into the recognizer; done prior to recognition.
| TSIGrammarID aGrammarID | grammar ID |
| IMPORT_C TInt | LoadLexicon | ( | TSILexiconID | aLexiconID | ) |
Loads the specified lexicon into the recognizer; done prior to recognition.
| TSILexiconID aLexiconID | lexicon ID |
| IMPORT_C TInt | LoadModels | ( | TSIModelBankID | aModelBankID | ) |
Loads the specified model bank into the recognizer; done prior to recognition.
| TSIModelBankID aModelBankID |
| IMPORT_C CSISpeechRecognitionUtility * | NewL | ( | MSISpeechRecognitionUtilityObserver & | aSpeechRecognitionUtilityObserver, |
| TUid | aClientUid | |||
| ) | [static] | |||
Factory function for creating this class.
| MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver | reference to event observer class |
| TUid aClientUid | client UID for data ownership |
| IMPORT_C CSISpeechRecognitionUtility * | NewL | ( | MSISpeechRecognitionUtilityObserver & | aSpeechRecognitionUtilityObserver, |
| TUid | aClientUid, | |||
| TNSSRecognitionMode | aPreferredMode | |||
| ) | [static] | |||
Factory function for creating this class. Searches for a plugin, which supports the given recognition mode. If no such plugin is found, leaves.
| MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver | reference to the event observer class |
| TUid aClientUid | client UID for data ownership |
| TNSSRecognitionMode aPreferredMode | Recognition technology (speaker independent or dependent) |
| IMPORT_C CSISpeechRecognitionUtility * | NewL | ( | MSISpeechRecognitionUtilityObserver & | aSpeechRecognitionUtilityObserver, |
| TUid | aClientUid, | |||
| TUid | aMmfPluginUid | |||
| ) | [static] | |||
Factory function for creating this class. Loads the plugin with the given ID.
| MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver | reference to the event observer class |
| TUid aClientUid | client UID for data ownership |
| TUid aMmfPluginUid | UID of the speech recognition plugin |
| IMPORT_C CSISpeechRecognitionUtility * | NewLC | ( | MSISpeechRecognitionUtilityObserver & | aSpeechRecognitionUtilityObserver, |
| TUid | aClientUid | |||
| ) | [static] | |||
Factory function for creating this class. Leaves a pointer on the cleanup
| MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver | reference to event observer class |
| TUid aClientUid | client UID for data ownership |
| IMPORT_C TInt | PreStartSampling | ( | ) |
Pre-starts samping before Record call.
| IMPORT_C TInt | Recognize | ( | CSIClientResultSet & | aResultSet | ) |
Initiates speaker independent recognition; performed following loading of model bank, lexicon, and grammar.
| CSIClientResultSet & aResultSet | reference where the recognition result is set |
| IMPORT_C TInt | Record | ( | TTimeIntervalMicroSeconds32 | aRecordTime | ) |
Records uder utterance for training and recognition.
| TTimeIntervalMicroSeconds32 aRecordTime | recording time in microseconds |
| IMPORT_C TInt | RemoveGrammar | ( | TSIGrammarID | aGrammarID | ) |
Removes the specified grammar from the permanent storage. Removing a grammar will remove all rules within the grammar.
| TSIGrammarID aGrammarID | grammar Id |
| IMPORT_C TInt | RemoveLexicon | ( | TSILexiconID | aLexiconID | ) |
Removes the specified lexicon from the permanent storage. Removing a lexicon will remove all pronunciations within the lexicon.
| TSILexiconID aLexiconID | lexicon Id |
| IMPORT_C TInt | RemoveModel | ( | TSIModelBankID | aModelBankID, |
| TSIModelID | aModelID | |||
| ) | ||||
Removes the specified model from the specified model bank permanently.
| TSIModelBankID aModelBankID | model bank Id |
| TSIModelID aModelID | model Id |
| IMPORT_C TInt | RemoveModelBank | ( | TSIModelBankID | aModelBankID | ) |
| TSIModelBankID aModelBankID | model bank Id |
| IMPORT_C TInt | RemovePronunciation | ( | TSILexiconID | aLexiconID, |
| TSIPronunciationID | aPronunciationID | |||
| ) | ||||
Removes the specified pronunciation from the specified lexicon permanently.
| TSILexiconID aLexiconID | lexicon Id |
| TSIPronunciationID aPronunciationID | pronunciation Id |
| IMPORT_C TInt | RemoveRule | ( | TSIGrammarID | aGrammarID, |
| TSIRuleID | aRuleID | |||
| ) | ||||
Removes the specified rule from the specified grammar permanently.
| TSIGrammarID aGrammarID | grammar Id |
| TSIRuleID aRuleID | rule Id |
| IMPORT_C TInt | RemoveRules | ( | TSIGrammarID | aGrammarID, |
| RArray < TSIRuleID > & | aRuleIDs | |||
| ) | ||||
Removes multiple rules from the specified grammar permanently.
| TSIGrammarID aGrammarID | grammar Id |
| RArray < TSIRuleID > & aRuleIDs |
| IMPORT_C TInt | SetAudioPriority | ( | TInt | aPriority, |
| TInt | aTrainPreference, | |||
| TInt | aPlaybackPreference, | |||
| TInt | aRecognitionPreference | |||
| ) | ||||
Set the audio priority and preference for train, playback and recognition
| IMPORT_C void | SetEventHandler | ( | MSISpeechRecognitionUtilityObserver * | aSpeechRecognitionUtilityObserver | ) |
Set the event handler for asynchronous events
| MSISpeechRecognitionUtilityObserver * aSpeechRecognitionUtilityObserver | pointer to observer |
| IMPORT_C TInt | StartRecSession | ( | TNSSRecognitionMode | aMode | ) |
Starts a new recognition session.
| TNSSRecognitionMode aMode | recognition mode |
| IMPORT_C TInt | UnloadGrammar | ( | TSIGrammarID | aGrammarID | ) |
Unloads the specified grammar from the list of grammars in temporary memory, previously loaded with LoadGrammarL. The grammar in the permanent storage remains intact.
| TSIGrammarID aGrammarID | grammar Id |
| IMPORT_C TInt | UnloadRule | ( | TSIGrammarID | aGrammarID, |
| TSIRuleID | aRuleID | |||
| ) | ||||
Unloads the specified rule from the specified grammar in temporary memory, previously loaded with LoadGrammarL. The rule in the permanent storage remains intact.
| TSIGrammarID aGrammarID | grammar Id |
| TSIRuleID aRuleID | rule Id |
| CMMFControllerEventMonitor * | iControllerEventMonitor | [private] |
| RArray < TSIPronunciationID > * | iPronunciationIDs | [private] |
| MSISpeechRecognitionUtilityObserver * | iSpeechRecognitionUtilityObserver | [private] |
| RSISpeechRecognitionCustomCommands | iSrCustomCommands | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.