RSISpeechRecognitionCustomCommands Class Reference
class RSISpeechRecognitionCustomCommands : public RMMFCustomCommandsBase |
This is the main class of NSS Speaker Independent Speech Recognition Custom Commands
nsssispeechrecognitioncustomcommands.lib
- Since
- 2.8
Inherits from
- RSISpeechRecognitionCustomCommands
Public Member Functions |
---|
| RSISpeechRecognitionCustomCommands(RMMFController &) |
IMPORT_C TInt | ActivateGrammar(TSIGrammarID) |
IMPORT_C TInt | Adapt(const CSIClientResultSet &, TInt) |
IMPORT_C TInt | AddPronunciation(TSILexiconID, const TDesC &, TLanguage, TSIPronunciationID &) |
IMPORT_C TInt | AddRule(TSIGrammarID, TSILexiconID, TSIPronunciationID, TSIRuleID &) |
IMPORT_C TInt | AddRuleVariant(TSIGrammarID, TSILexiconID, const RArray< TSIPronunciationID > &, TSIRuleID, TSIRuleVariantID &) |
IMPORT_C TInt | AddVoiceTag(const MDesCArray &, const RArray< TLanguage > &, TSILexiconID, TSIGrammarID, TSIRuleID &) |
IMPORT_C TInt | AddVoiceTag(const MDesCArray &, const RArray< RLanguageArray > &, TSILexiconID, TSIGrammarID, TSIRuleID &) |
IMPORT_C TInt | AddVoiceTags(const RPointerArray< MDesCArray > &, const RArray< TLanguage > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &) |
IMPORT_C TInt | AddVoiceTags(const RPointerArray< MDesCArray > &, const RArray< RLanguageArray > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &) |
IMPORT_C void | Cancel() |
IMPORT_C TInt | CommitChanges() |
IMPORT_C TInt | CreateGrammar(TSIGrammarID &) |
IMPORT_C TInt | CreateLexicon(TSILexiconID &) |
IMPORT_C TInt | CreateModelBank(TSIModelBankID &) |
IMPORT_C TInt | CreateRule(TSIGrammarID, TSIRuleID &) |
IMPORT_C TInt | DeactivateGrammar(TSIGrammarID) |
IMPORT_C TInt | EndRecSession() |
IMPORT_C TInt | EndRecord() |
IMPORT_C TInt | GetAllClientGrammarIDs() |
IMPORT_C TInt | GetAllClientLexiconIDs() |
IMPORT_C TInt | GetAllClientModelBankIDs() |
IMPORT_C TInt | GetAllGrammarIDs() |
IMPORT_C TInt | GetAllLexiconIDs() |
IMPORT_C TInt | GetAllModelBankIDs() |
IMPORT_C TInt | GetAllModelIDs(TSIModelBankID) |
IMPORT_C TInt | GetAllPronunciationIDs(TSILexiconID) |
IMPORT_C TInt | GetAllRuleIDs(TSIGrammarID) |
IMPORT_C TInt | GetEngineProperties(const RArray< TInt > &, RArray< TInt > &) |
IMPORT_C void | GetGrammarIDArrayL(RArray< TSIGrammarID > &) |
IMPORT_C void | GetLexiconIDArrayL(RArray< TSILexiconID > &) |
IMPORT_C void | GetModelBankIDArrayL(RArray< TSIModelBankID > &) |
IMPORT_C TInt | GetModelCount(TSIModelBankID, TInt &) |
IMPORT_C void | GetModelIDArrayL(RArray< TSIModelID > &) |
IMPORT_C void | GetPronunciationIDArrayL(RArray< TSIPronunciationID > &) |
IMPORT_C void | GetRuleIDArrayL(RArray< TSIRuleID > &) |
IMPORT_C TInt | GetRuleValidity(TSIGrammarID, TSIRuleID, TBool &) |
IMPORT_C void | GetSIResultSetL(CSIClientResultSet &) |
IMPORT_C TInt | LoadEngineParameters(const RArray< TInt > &, const RArray< TInt > &) |
IMPORT_C TInt | LoadGrammar(TSIGrammarID) |
IMPORT_C TInt | LoadLexicon(TSILexiconID) |
IMPORT_C TInt | LoadModels(TSIModelBankID) |
IMPORT_C TInt | PreStartSampling() |
IMPORT_C TInt | Recognize(CSIClientResultSet &) |
IMPORT_C TInt | Record(TTimeIntervalMicroSeconds32) |
IMPORT_C TInt | RemoveGrammar(TSIGrammarID) |
IMPORT_C TInt | RemoveLexicon(TSILexiconID) |
IMPORT_C TInt | RemoveModel(TSIModelBankID, TSIModelID) |
IMPORT_C TInt | RemoveModelBank(TSIModelBankID) |
IMPORT_C TInt | RemovePronunciation(TSILexiconID, TSIPronunciationID) |
IMPORT_C TInt | RemoveRule(TSIGrammarID, TSIRuleID) |
IMPORT_C TInt | RemoveRules(TSIGrammarID, RArray< TSIRuleID > &) |
IMPORT_C TInt | SetClientUid(TUid) |
IMPORT_C TInt | StartRecSession(TNSSRecognitionMode) |
IMPORT_C TInt | UnloadGrammar(TSIGrammarID) |
IMPORT_C TInt | UnloadRule(TSIGrammarID, TSIRuleID) |
Constructor & Destructor Documentation
RSISpeechRecognitionCustomCommands(RMMFController &)
IMPORT_C | RSISpeechRecognitionCustomCommands | ( | RMMFController & | aController | ) | |
Public C++ constructor for RSpeechRecognitionCustomCommands class.
Member Functions Documentation
ActivateGrammar(TSIGrammarID)
Activates a loaded and deactivated grammar.
Adapt(const CSIClientResultSet &, TInt)
Adapts speaker independent models according using a correct recognition result.
Parameters
const CSIClientResultSet & aResultSet | The result N-Best containing feature vectors aCorrect The correct index |
TInt aCorrect | |
AddPronunciation(TSILexiconID, const TDesC &, TLanguage, TSIPronunciationID &)
Adds a pronunciation to the given lexicon.
AddRule(TSIGrammarID, TSILexiconID, TSIPronunciationID, TSIRuleID &)
Adds a new rule for the given pronunciation into the specified grammar.
- Since
- 2.0
AddRuleVariant(TSIGrammarID, TSILexiconID, const RArray< TSIPronunciationID > &, TSIRuleID, TSIRuleVariantID &)
Adds a rule variant to a grammar.
AddVoiceTag(const MDesCArray &, const RArray< TLanguage > &, TSILexiconID, TSIGrammarID, TSIRuleID &)
Trains a voice tag. Adds the text to the lexicon, and creates the required rules and rule variants.
Parameters
const MDesCArray & aTrainArray | The phrase to be trained, split into subwords |
const RArray< TLanguage > & aLanguageArray | The pronunciaiton languages |
TSILexiconID aLexiconID | Lexicon identifier |
TSIGrammarID aGrammarID | Grammar identifier |
TSIRuleID & aRuleID | Reference, where the new rule identifier is assigned to. |
AddVoiceTag(const MDesCArray &, const RArray< RLanguageArray > &, TSILexiconID, TSIGrammarID, TSIRuleID &)
Trains a voice tag. Adds the text to the lexicon, and creates the required rules and rule variants.
Parameters
const MDesCArray & aTrainArray | The phrase to be trained, split into subwords |
const RArray< RLanguageArray > & aLanguageArray | The pronunciaiton languages |
TSILexiconID aLexiconID | Lexicon identifier |
TSIGrammarID aGrammarID | Grammar identifier |
TSIRuleID & aRuleID | Reference, where the new rule identifier is assigned to. |
AddVoiceTags(const RPointerArray< MDesCArray > &, const RArray< TLanguage > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &)
Trains voice tags. If the training fails for some of the names (but not all), it is signaled by setting the Rule ID to KInvalidRuleID.
Parameters
const RPointerArray< MDesCArray > & aTrainArray | The phrase to be trained, split into subwords |
const RArray< TLanguage > & aLanguageArray | The pronunciation languages |
TSILexiconID aLexiconID | Lexicon identifier |
TSIGrammarID aGrammarID | Grammar identifier |
RArray< TSIRuleID > & aRuleID | Referenceto an array, where the new Rule identifiers are assigned to. |
AddVoiceTags(const RPointerArray< MDesCArray > &, const RArray< RLanguageArray > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &)
Trains voice tags. If the training fails for some of the names (but not all), it is signaled by setting the Rule ID to KInvalidRuleID.
Cancel()
Cancels the current operation
- Since
- 2.0
CommitChanges()
IMPORT_C TInt | CommitChanges | ( | ) | |
Saves the current changes into permanent storage.
- Since
- 2.0
CreateGrammar(TSIGrammarID &)
Creates a new grammar.
- Since
- 2.0
Parameters
TSIGrammarID & aGrammarID | reference where grammar ID is stored |
CreateLexicon(TSILexiconID &)
Creates a new lexicon.
- Since
- 2.0
Parameters
TSILexiconID & aLexiconID | reference where lexicon ID is stored |
CreateModelBank(TSIModelBankID &)
Creates a new model bank.
- Since
- 2.0
Parameters
TSIModelBankID & aModelBankID | reference where a new model bank Id is assigned to |
CreateRule(TSIGrammarID, TSIRuleID &)
DeactivateGrammar(TSIGrammarID)
Deactivates a loaded grammar so that it is not recognized.
DoGetEnginePropertiesL(const RArray< TInt > &, RArray< TInt > &)
void | DoGetEnginePropertiesL | ( | const RArray< TInt > & | aPropertyId, |
| RArray< TInt > & | aPropertyValue |
| ) | [private] |
Returns the engine properties specified by the engine property ID array. On return aPropertyValue contains an array of engine properties. This function does the actual work.
- Since
- 2.0
Parameters
const RArray< TInt > & aPropertyId | constant reference to array of engine property Ids |
RArray< TInt > & aPropertyValue | reference to array of engine property values |
DoLoadEngineParametersL(const RArray< TInt > &, const RArray< TInt > &)
void | DoLoadEngineParametersL | ( | const RArray< TInt > & | aParameterId, |
| const RArray< TInt > & | aParameterValue |
| ) | [private] |
Uploads the specified parameters into the engine. This function does the actual work.
- Since
- 2.0
Parameters
const RArray< TInt > & aParameterId | array of parameter IDs |
const RArray< TInt > & aParameterValue | array of parameter values |
DoRecognizeL(CSDClientResultSet &)
void | DoRecognizeL | ( | CSDClientResultSet & | aResultSet | ) | [private] |
Initiates recognition; performed following loading of model bank, lexicon, and grammar. This function does the actual work and is trapped by the public
Recognize() function.
- Since
- 2.0
Parameters
CSDClientResultSet & aResultSet | reference where the recognition result is set |
DoRecognizeSIL(CSIClientResultSet &)
Initiates speaker independent recognition; performed following loading of model bank, lexicon, and grammar. This function does the actual work and is trapped by the public
Recognize() function.
- Since
- 2.8
EndRecSession()
IMPORT_C TInt | EndRecSession | ( | ) | |
Ends the current recognition session. Resources allocated for recognition are freed.
- Since
- 2.0
EndRecord()
Stops recognition. Unlike Cancel(), this function gives the recognition result, if it can be guessed.
ExternalizeIntArrayL(const RArray< TInt > &)
GetAllClientGrammarIDs()
IMPORT_C TInt | GetAllClientGrammarIDs | ( | ) | |
Returns all grammar Ids that belong to the current client.
- Since
- 2.0
GetAllClientLexiconIDs()
IMPORT_C TInt | GetAllClientLexiconIDs | ( | ) | |
Returns all lexicon Ids that belong to the current client.
- Since
- 2.0
GetAllClientModelBankIDs()
IMPORT_C TInt | GetAllClientModelBankIDs | ( | ) | |
Returns all model bank Ids that belong to the current client.
- Since
- 2.0
GetAllGrammarIDs()
IMPORT_C TInt | GetAllGrammarIDs | ( | ) | |
Returns all grammar Ids that exist (for all clients).
- Since
- 2.0
GetAllLexiconIDs()
IMPORT_C TInt | GetAllLexiconIDs | ( | ) | |
Returns all lexicon Ids that exist (for all clients).
- Since
- 2.0
GetAllModelBankIDs()
IMPORT_C TInt | GetAllModelBankIDs | ( | ) | |
Returns all model bank Ids that exist (for all clients).
- Since
- 2.0
GetAllModelIDs(TSIModelBankID)
Returns all model Ids that exist in the specified model bank.
- Since
- 2.0
GetAllPronunciationIDs(TSILexiconID)
Returns all pronunciation Ids that exist in the specified lexicon.
- Since
- 2.0
GetAllRuleIDs(TSIGrammarID)
Returns all rule Ids that exist in the specified grammar.
- Since
- 2.0
GetEngineProperties(const RArray< TInt > &, RArray< TInt > &)
Returns the engine properties specified by the engine property ID array. On return aPropertyValue contains an array of engine properties.
- Since
- 2.0
Parameters
const RArray< TInt > & aPropertyId | constant reference to array of engine property Ids |
RArray< TInt > & aPropertyValue | reference to array of engine property values |
GetGrammarIDArrayL(RArray< TSIGrammarID > &)
Get the grammar ID array. On return aGrammarIDs contains an array of rule IDs.
- Since
- 2.0
GetLexiconIDArrayL(RArray< TSILexiconID > &)
Get the lexicon ID array. On return aLexiconIDs contains an array of lexicon IDs.
- Since
- 2.0
GetModelBankIDArrayL(RArray< TSIModelBankID > &)
Get the model bank ID array. On return aModelBankIDs contains an array of model bank IDs.
- Since
- 2.0
GetModelCount(TSIModelBankID, TInt &)
Returns the number of models in the specified model bank.
- Since
- 2.0
GetModelIDArrayL(RArray< TSIModelID > &)
Get the model ID array. On return aModelIDs contains an array of model IDs.
- Since
- 2.0
GetPronunciationIDArrayL(RArray< TSIPronunciationID > &)
Get the pronunciation ID array. On return aPronunciationIDs contains an array of pronunciation IDs.
- Since
- 2.0
GetRuleIDArrayL(RArray< TSIRuleID > &)
Get the rule ID array. On return aRuleIDs contains an array of rule IDs.
- Since
- 2.0
GetRuleValidity(TSIGrammarID, TSIRuleID, TBool &)
Checks if the rule is valid or not.
- Since
- 2.0
GetSIResultSetL(CSIClientResultSet &)
Get the client result set. This function should be called after recognition. On return aResultSet contains client result set.
- Since
- 2.8
InternalizeIntArrayL(TDes8 &, TInt, RArray< TInt > &)
Parameters
TDes8 & aDes | descriptor containing the data to internalize |
TInt aNumberElements | number of elements to internalize |
RArray< TInt > & aArray | contains the internalized array on exit |
LoadEngineParameters(const RArray< TInt > &, const RArray< TInt > &)
Uploads the specified parameters into the engine.
- Since
- 2.0
Parameters
const RArray< TInt > & aParameterId | array of parameter IDs |
const RArray< TInt > & aParameterValue | array of parameter values |
LoadGrammar(TSIGrammarID)
LoadLexicon(TSILexiconID)
Loads the specified lexicon into the recognizer; done prior to recognition.
- Since
- 2.0
LoadModels(TSIModelBankID)
Loads the specified model bank into the recognizer; done prior to recognition..
- Since
- 2.0
PreStartSampling()
IMPORT_C TInt | PreStartSampling | ( | ) | |
Pre-starts recording before Record() call.
Recognize(CSIClientResultSet &)
Record(TTimeIntervalMicroSeconds32)
Records uder utterance for training and recognition.
- Since
- 2.0
RemoveGrammar(TSIGrammarID)
Removes the specified grammar from the permanent storage. Removing a grammar will remove all rules within the grammar.
- Since
- 2.0
RemoveLexicon(TSILexiconID)
Removes the specified lexicon from the permanent storage. Removing a lexicon will remove all pronunciations within the lexicon.
- Since
- 2.0
RemoveModel(TSIModelBankID, TSIModelID)
Removes the specified model from the specified model bank permanently.
- Since
- 2.0
RemoveModelBank(TSIModelBankID)
Removes the specified model bank from the permanent storage. Removing a model bank will remove all models within the model bank.
- Since
- 2.0
RemovePronunciation(TSILexiconID, TSIPronunciationID)
Removes the specified pronunciation from the specified lexicon permanently.
- Since
- 2.0
RemoveRule(TSIGrammarID, TSIRuleID)
Removes the specified rule from the specified grammar permanently.
- Since
- 2.0
RemoveRules(TSIGrammarID, RArray< TSIRuleID > &)
Removes the specified rule from the specified grammar permanently.
- Since
- 2.8
SetClientUid(TUid)
IMPORT_C TInt | SetClientUid | ( | TUid | aClientUid | ) | |
Sets the client's UID for data ownership identification.
- Since
- 2.0
Parameters
TUid aClientUid | client's UID |
StartRecSession(TNSSRecognitionMode)
Starts a new recognition session.
- Since
- 2.0
UnloadGrammar(TSIGrammarID)
UnloadRule(TSIGrammarID, TSIRuleID)
Unloads the specified rule from the specified grammar in temporary memory, previously loaded with LoadGrammarL. The rule in the permanent storage remains intact.
- Since
- 2.0
Member Data Documentation
TAny * iReservedPtr_1
TAny * | iReservedPtr_1 | [private] |
TAny * iReservedPtr_2
TAny * | iReservedPtr_2 | [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.