#include <mmf/common/speechrecognitioncustomcommands.h>
Link against: speechrecognitioncustomcommands.lib
class RSpeechRecognitionCustomCommands : public RMMFCustomCommandsBase |
Inherited Attributes | |
---|---|
RMMFCustomCommandsBase::iController | |
RMMFCustomCommandsBase::iDestinationPckg |
Inherited Functions | |
---|---|
RMMFCustomCommandsBase::RMMFCustomCommandsBase(RMMFController &,TUid) |
This is the main class of Speech Recognition Custom Commands.
IMPORT_C | RSpeechRecognitionCustomCommands | ( | RMMFController & | aController | ) |
Public C++ constructor for RSpeechRecognitionCustomCommands class.
Parameters | |
---|---|
aController | A reference to a RMMFController object. |
IMPORT_C TInt | AddPronunciation | ( | TLexiconID | aLexiconID, |
TModelBankID | aModelBankID, | |||
TModelID | aModelID, | |||
TPronunciationID & | aPronunciationID | |||
) |
Adds a new pronunciation for the given model into the specified lexicon.
Parameters | |
---|---|
aLexiconID | The lexicon ID to where the new pronunciation is added. |
aModelBankID | The model bank ID. |
aModelID | The model ID. |
aPronunciationID | A reference to where a new pronunciation ID is assigned. |
IMPORT_C TInt | AddRule | ( | TGrammarID | aGrammarID, |
TLexiconID | aLexiconID, | |||
TPronunciationID | aPronunciationID, | |||
TRuleID & | aRuleID | |||
) |
Adds a new rule for the given pronunciation into the specified grammar.
Parameters | |
---|---|
aGrammarID | The grammar ID to where the new rule is added. |
aLexiconID | The lexicon ID. |
aPronunciationID | The pronunciation ID. |
aRuleID | A reference to where a new rule ID is assigned. |
IMPORT_C TInt | CommitChanges | ( | ) |
Commits the current train operation to the database.
IMPORT_C TInt | CreateGrammar | ( | TGrammarID & | aGrammarID | ) |
Creates a new grammar.
Parameters | |
---|---|
aGrammarID | A reference to where the grammar ID is stored. |
IMPORT_C TInt | CreateLexicon | ( | TLexiconID & | aLexiconID | ) |
Creates a new lexicon.
Parameters | |
---|---|
aLexiconID | A reference where lexicon ID is stored. |
IMPORT_C TInt | CreateModelBank | ( | TModelBankID & | aModelBankID | ) |
Creates a new model bank.
Parameters | |
---|---|
aModelBankID | A reference to where a new model bank ID is assigned. |
IMPORT_C TInt | EndRecSession | ( | ) |
Ends the current recognition session.
The resources allocated for recognition are freed.
IMPORT_C TInt | GetAllClientGrammarIDs | ( | ) |
Returns all grammar IDs owned by the client.
IMPORT_C TInt | GetAllClientLexiconIDs | ( | ) |
Returns all lexicon IDs owned by the client.
IMPORT_C TInt | GetAllClientModelBankIDs | ( | ) |
Returns all modelBank IDs owned by the client.
IMPORT_C TInt | GetAllGrammarIDs | ( | ) |
Returns all grammar IDs owned by the client.
IMPORT_C TInt | GetAllLexiconIDs | ( | ) |
Returns all lexicon IDs owned by the client.
IMPORT_C TInt | GetAllModelBankIDs | ( | ) |
Returns all modelBank IDs owned by the client.
IMPORT_C TInt | GetAllModelIDs | ( | TModelBankID | aModelBankID | ) |
Returns all model IDs that exist in the specified model bank.
Parameters | |
---|---|
aModelBankID | The model bank ID. |
IMPORT_C TInt | GetAllPronunciationIDs | ( | TLexiconID | aLexiconID | ) |
Returns all pronunciation IDs that exist in the specified lexicon.
Parameters | |
---|---|
aLexiconID | The lexicon ID. |
IMPORT_C TInt | GetAllRuleIDs | ( | TGrammarID | aGrammarID | ) |
Returns all rule IDs that exist in the specified grammar.
Parameters | |
---|---|
aGrammarID | The grammar ID. |
Returns the number of models available for training system wide, based on available disk space.
Parameters | |
---|---|
aAvailableStorage | The number of models that can be held in available storage space. |
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.
Parameters | |
---|---|
aPropertyId | A constant reference to an array of engine property IDs. |
aPropertyValue | A reference to an array of engine property values. |
IMPORT_C void | GetGrammarIDArrayL | ( | RArray< TGrammarID > & | aGrammarIDs | ) |
Gets an array of grammar IDs previously requested by GetAllGrammarIDs.
Parameters | |
---|---|
aGrammarIDs | An array to store grammar IDs. |
IMPORT_C void | GetLexiconIDArrayL | ( | RArray< TLexiconID > & | aLexiconIDs | ) |
Gets an array of lexicon IDs previously requested by GetAllLexiconIDs.
Parameters | |
---|---|
aLexiconIDs | An array to store lexicon IDs. |
IMPORT_C void | GetModelBankIDArrayL | ( | RArray< TModelBankID > & | aModelBankIDs | ) |
Gets an array of modelBank IDs previously requested by GetAllModelBankIDs.
Parameters | |
---|---|
aModelBankIDs | An array to store modelBank IDs. |
IMPORT_C TInt | GetModelCount | ( | TModelBankID | aModelBankID, |
TInt & | aModelCount | |||
) |
Returns the number of models in the specified model bank.
Parameters | |
---|---|
aModelBankID | The model bank ID. |
aModelCount | The reference where the number of models is set. |
IMPORT_C void | GetPronunciationIDArrayL | ( | RArray< TPronunciationID > & | aPronunciationIDs | ) |
Gets an array of pronunciation IDs previously requested by GetAllPronunciationIDs.
Parameters | |
---|---|
aPronunciationIDs | An array to store pronunciation IDs. |
IMPORT_C void | GetResultSetL | ( | CSDClientResultSet & | aResultSet | ) |
Gets a client result set previously created by a call to Recognise().
Parameters | |
---|---|
aResultSet | The ResultSet used to contain the recognition results |
IMPORT_C TInt | GetRuleValidity | ( | TGrammarID | aGrammarID, |
TRuleID | aRuleID, | |||
TBool & | aValid | |||
) |
Checks if the rule is valid or not.
Parameters | |
---|---|
aGrammarID | The grammar ID. |
aRuleID | The rule ID. |
aValid | A reference where the validity of the rule is set. |
IMPORT_C TInt | GetUtteranceDuration | ( | TModelBankID | aModelBankID, |
TModelID | aModelID, | |||
TTimeIntervalMicroSeconds32 & | aDuration | |||
) |
Parameters | |
---|---|
aModelBankID | model bank Id |
aModelID | model Id |
aDuration | reference where the duration of utterance is set |
IMPORT_C TInt | LoadEngineParameters | ( | const RArray< TInt > & | aParameterId, |
const RArray< TInt > & | aParameterValue | |||
) |
Uploads the specified parameters into the engine.
Parameters | |
---|---|
aParameterId | An array of parameter IDs. |
aParameterValue | An array of parameter values. |
IMPORT_C TInt | LoadGrammar | ( | TGrammarID | aGrammarID | ) |
Loads the specified grammar into the recognizer; done prior to recognition.
Parameters | |
---|---|
aGrammarID | The grammar ID. |
IMPORT_C TInt | LoadLexicon | ( | TLexiconID | aLexiconID | ) |
Loads the specified lexicon into the recognizer; done prior to recognition.
Parameters | |
---|---|
aLexiconID | The lexicon ID. |
IMPORT_C TInt | LoadModels | ( | TModelBankID | aModelBankID | ) |
Loads the specified model bank into the recognizer; done prior to recognition.
Parameters | |
---|---|
aModelBankID | The model bank ID. |
IMPORT_C TInt | PlayUtterance | ( | TModelBankID | aModelBankID, |
TModelID | aModelID | |||
) |
Plays the previously trained utterance.
Parameters | |
---|---|
aModelBankID | The model bank ID. |
aModelID | The model ID, whose utterance is played. |
IMPORT_C TInt | Recognize | ( | CSDClientResultSet & | aResultSet | ) |
Initiates recognition; performed following loading of model bank, lexicon, and grammar.
Parameters | |
---|---|
aResultSet | A reference where the recognition result is set. |
IMPORT_C TInt | Record | ( | TTimeIntervalMicroSeconds32 | aRecordTime | ) |
Records the user utterance for training and recognition.
Parameters | |
---|---|
aRecordTime | The recording time in microseconds. |
IMPORT_C TInt | RemoveGrammar | ( | TGrammarID | aGrammarID | ) |
Removes the specified grammar from the permanent storage.
Removing a grammar will remove all rules within the grammar.
Parameters | |
---|---|
aGrammarID | The grammar ID. |
IMPORT_C TInt | RemoveLexicon | ( | TLexiconID | aLexiconID | ) |
Removes the specified lexicon from the permanent storage.
Removing a lexicon will remove all pronunciations within the lexicon.
Parameters | |
---|---|
aLexiconID | The lexicon ID. |
IMPORT_C TInt | RemoveModel | ( | TModelBankID | aModelBankID, |
TModelID | aModelID | |||
) |
Removes the specified model from the specified model bank permanently.
Parameters | |
---|---|
aModelBankID | The model bank ID. |
aModelID | The model ID. |
IMPORT_C TInt | RemoveModelBank | ( | TModelBankID | aModelBankID | ) |
Removes the specified model bank from the permanent storage.
Removing a model bank will remove all models within the model bank.
Parameters | |
---|---|
aModelBankID | The model bank ID. |
IMPORT_C TInt | RemovePronunciation | ( | TLexiconID | aLexiconID, |
TPronunciationID | aPronunciationID | |||
) |
Removes the specified pronunciation from the specified lexicon permanently.
Parameters | |
---|---|
aLexiconID | The lexicon ID. |
aPronunciationID | The pronunciation ID. |
IMPORT_C TInt | RemoveRule | ( | TGrammarID | aGrammarID, |
TRuleID | aRuleID | |||
) |
Removes the specified rule from the specified grammar permanently.
Parameters | |
---|---|
aGrammarID | The grammar ID. |
aRuleID | The rule ID. |
IMPORT_C TInt | StartRecSession | ( | TRecognitionMode | aMode | ) |
Starts a new recognition session.
Parameters | |
---|---|
aMode | The recognition mode. |
IMPORT_C TInt | Train | ( | TModelBankID | aModelBankID, |
TModelID & | aModelID | |||
) |
Trains a new model into the specified model bank.
Parameters | |
---|---|
aModelBankID | The model bank ID. |
aModelID | The reference to where a new model ID is assigned. |
IMPORT_C TInt | UnloadRule | ( | TGrammarID | aGrammarID, |
TRuleID | aRuleID | |||
) |
Unloads the specified rule from the specified grammar in temporary memory, previously loaded with LoadGrammarL(). The rule in the permanent storage remains intact.
Parameters | |
---|---|
aGrammarID | The grammar ID. |
aRuleID | The rule ID. |