MSpeechRecognitionCustomCommandImplementor Class Reference

#include <mmf/common/speechrecognitioncustomcommandimplementor.h>

class MSpeechRecognitionCustomCommandImplementor
Public Member Functions
pure virtual voidMSrAddPronunciationL(TLexiconID, TModelBankID, TModelID, TPronunciationID &)
pure virtual voidMSrAddRuleL(TGrammarID, TLexiconID, TPronunciationID, TRuleID &)
pure virtual voidMSrCancel()
pure virtual voidMSrCommitChangesL()
pure virtual voidMSrCreateGrammarL(TGrammarID &)
pure virtual voidMSrCreateLexiconL(TLexiconID &)
pure virtual voidMSrCreateModelBankL(TModelBankID &)
pure virtual voidMSrEndRecSessionL()
pure virtual voidMSrGetAllClientGrammarIDsL(RArray< TGrammarID > &)
pure virtual voidMSrGetAllClientLexiconIDsL(RArray< TLexiconID > &)
pure virtual voidMSrGetAllClientModelBankIDsL(RArray< TModelBankID > &)
pure virtual voidMSrGetAllGrammarIDsL(RArray< TGrammarID > &)
pure virtual voidMSrGetAllLexiconIDsL(RArray< TLexiconID > &)
pure virtual voidMSrGetAllModelBankIDsL(RArray< TModelBankID > &)
pure virtual voidMSrGetAllModelIDsL(TModelBankID, RArray< TModelID > &)
pure virtual voidMSrGetAllPronunciationIDsL(TLexiconID, RArray< TPronunciationID > &)
pure virtual voidMSrGetAllRuleIDsL(TGrammarID, RArray< TRuleID > &)
pure virtual voidMSrGetAvailableStorageL(TInt &)
pure virtual voidMSrGetEnginePropertiesL(const RArray< TInt > &, RArray< TInt > &)
pure virtual voidMSrGetModelCountL(TModelBankID, TInt &)
pure virtual voidMSrGetRuleValidityL(TGrammarID, TRuleID, TBool &)
pure virtual voidMSrGetUtteranceDurationL(TModelBankID, TModelID, TTimeIntervalMicroSeconds32 &)
pure virtual voidMSrLoadEngineParametersL(const RArray< TInt > &, const RArray< TInt > &)
pure virtual voidMSrLoadGrammarL(TGrammarID)
pure virtual voidMSrLoadLexiconL(TLexiconID)
pure virtual voidMSrLoadModelsL(TModelBankID)
pure virtual voidMSrPlayUtteranceL(TModelBankID, TModelID)
pure virtual voidMSrRecognizeL(CSDClientResultSet &)
pure virtual voidMSrRecordL(TTimeIntervalMicroSeconds32)
pure virtual voidMSrRemoveGrammarL(TGrammarID)
pure virtual voidMSrRemoveLexiconL(TLexiconID)
pure virtual voidMSrRemoveModelBankL(TModelBankID)
pure virtual voidMSrRemoveModelL(TModelBankID, TModelID)
pure virtual voidMSrRemovePronunciationL(TLexiconID, TPronunciationID)
pure virtual voidMSrRemoveRuleL(TGrammarID, TRuleID)
pure virtual voidMSrSetClientUid(TUid)
pure virtual voidMSrStartRecSessionL(TRecognitionMode)
pure virtual voidMSrTrainL(TModelBankID, TModelID &)
pure virtual voidMSrUnloadRuleL(TGrammarID, TRuleID)

Detailed Description

This is the main class of Speech Recognition Custom Commands Implementor.

Since
8.0

Member Function Documentation

MSrAddPronunciationL ( TLexiconID, TModelBankID, TModelID, TPronunciationID & )

voidMSrAddPronunciationL(TLexiconIDaLexiconID,
TModelBankIDaModelBankID,
TModelIDaModelID,
TPronunciationID &aPronunciationID
)[pure virtual]

Adds a new pronunciation for the given model into the specified lexicon.

Since
8.0
ParameterDescription
aLexiconIDThe lexicon ID to where the new pronunciation is added.
aModelBankIDThe model bank ID.
aModelIDThe model ID.
aPronunciationIDA reference to where a new pronunciation ID is assigned.

MSrAddRuleL ( TGrammarID, TLexiconID, TPronunciationID, TRuleID & )

voidMSrAddRuleL(TGrammarIDaGrammarID,
TLexiconIDaLexiconID,
TPronunciationIDaPronunciationID,
TRuleID &aRuleID
)[pure virtual]

Adds a new rule for the given pronunciation into the specified grammar.

Since
8.0
ParameterDescription
aGrammarIDThe grammar ID, where the new rule is added to
aLexiconIDThe lexicon ID.
aPronunciationIDThe pronunciation ID.
aRuleIDA reference where a new rule ID is assigned to.

MSrCancel ( )

voidMSrCancel()[pure virtual]

Cancels the current operation.

Since
8.0

MSrCommitChangesL ( )

voidMSrCommitChangesL()[pure virtual]

Commit uncommited changes to the database.

Since
8.0

MSrCreateGrammarL ( TGrammarID & )

voidMSrCreateGrammarL(TGrammarID &aGrammarID)[pure virtual]

Creates a new grammar.

Since
8.0
ParameterDescription
aGrammarIDA reference where the grammar ID is stored.

MSrCreateLexiconL ( TLexiconID & )

voidMSrCreateLexiconL(TLexiconID &aLexiconID)[pure virtual]

Creates a new lexicon.

Since
8.0
ParameterDescription
aLexiconIDA reference where the lexicon ID is stored.

MSrCreateModelBankL ( TModelBankID & )

voidMSrCreateModelBankL(TModelBankID &aModelBankID)[pure virtual]

Creates a new model bank.

Since
8.0
ParameterDescription
aModelBankIDA reference to where a new model bank ID is assigned.

MSrEndRecSessionL ( )

voidMSrEndRecSessionL()[pure virtual]

Ends the current recognition session. Resources allocated for recognition are freed.

Since
8.0

MSrGetAllClientGrammarIDsL ( RArray< TGrammarID > & )

voidMSrGetAllClientGrammarIDsL(RArray< TGrammarID > &aGrammarIDs)[pure virtual]

Returns all grammar IDs that are owned by the client.

Since
8.0
ParameterDescription
aGrammarIDsA reference where grammar IDs are stored.

MSrGetAllClientLexiconIDsL ( RArray< TLexiconID > & )

voidMSrGetAllClientLexiconIDsL(RArray< TLexiconID > &aLexiconIDs)[pure virtual]

Returns all lexicon IDs that are owned by the client.

Since
8.0
ParameterDescription
aLexiconIDsA reference where the lexicon IDs are stored.

MSrGetAllClientModelBankIDsL ( RArray< TModelBankID > & )

voidMSrGetAllClientModelBankIDsL(RArray< TModelBankID > &aModelBankIDs)[pure virtual]

Returns all modelbank IDs that are owned by the client.

Since
8.0
ParameterDescription
aModelBankIDsA reference where model bank IDs are stored.

MSrGetAllGrammarIDsL ( RArray< TGrammarID > & )

voidMSrGetAllGrammarIDsL(RArray< TGrammarID > &aGrammarIDs)[pure virtual]

Returns all grammar IDs.

ParameterDescription
aGrammarIDsA reference where grammar IDs are stored.

MSrGetAllLexiconIDsL ( RArray< TLexiconID > & )

voidMSrGetAllLexiconIDsL(RArray< TLexiconID > &aLexiconIDs)[pure virtual]

Returns all lexicon IDs.

ParameterDescription
aLexiconIDsA reference where lexicon IDs are stored.

MSrGetAllModelBankIDsL ( RArray< TModelBankID > & )

voidMSrGetAllModelBankIDsL(RArray< TModelBankID > &aModelBankIDs)[pure virtual]

Returns all modelbank IDs.

Since
8.0
ParameterDescription
aModelBankIDsA reference where the model bank IDs are stored.

MSrGetAllModelIDsL ( TModelBankID, RArray< TModelID > & )

voidMSrGetAllModelIDsL(TModelBankIDaModelBankID,
RArray< TModelID > &aModelIDs
)[pure virtual]

Returns all model IDs that exist in the specified model bank.

Since
8.0
ParameterDescription
aModelBankIDThe model bank ID.
aModelIDsA reference where model IDs are stored.

MSrGetAllPronunciationIDsL ( TLexiconID, RArray< TPronunciationID > & )

voidMSrGetAllPronunciationIDsL(TLexiconIDaLexiconID,
RArray< TPronunciationID > &aPronunciationIDs
)[pure virtual]

Returns all pronunciation IDs that exist in the specified lexicon.

Since
8.0
ParameterDescription
aLexiconIDThe lexicon ID.
aPronunciationIDsA reference where pronunciation IDs are stored.

MSrGetAllRuleIDsL ( TGrammarID, RArray< TRuleID > & )

voidMSrGetAllRuleIDsL(TGrammarIDaGrammarID,
RArray< TRuleID > &aRuleIDs
)[pure virtual]

Returns all rule IDs that exist in the specified grammar.

Since
8.0
ParameterDescription
aGrammarIDThe grammar ID.
aRuleIDsA reference where rule IDs are stored.

MSrGetAvailableStorageL ( TInt & )

voidMSrGetAvailableStorageL(TInt &aCount)[pure virtual]

Returns the number of models available for training system wide, based on available disk space.

Since
8.0
ParameterDescription
aCountA reference where the number of available models is set.

MSrGetEnginePropertiesL ( const RArray< TInt > &, RArray< TInt > & )

voidMSrGetEnginePropertiesL(const RArray< TInt > &aPropertyId,
RArray< TInt > &aPropertyValue
)[pure virtual]

Returns the engine properties specified by the engine property ID array.

On return aPropertyValue contains an array of engine properties.

Since
8.0
ParameterDescription
aPropertyIdA constant reference to an array of engine property IDs.
aPropertyValueA reference to an array of engine property values.

MSrGetModelCountL ( TModelBankID, TInt & )

voidMSrGetModelCountL(TModelBankIDaModelBankID,
TInt &aCount
)[pure virtual]

Returns the number of models in the specified model bank.

Since
8.0
ParameterDescription
aModelBankIDThe model bank ID.
aCountA reference where the number of models is set.

MSrGetRuleValidityL ( TGrammarID, TRuleID, TBool & )

voidMSrGetRuleValidityL(TGrammarIDaGrammarID,
TRuleIDaRuleID,
TBool &aValid
)[pure virtual]

Checks if the rule is valid or not.

Since
8.0
ParameterDescription
aGrammarIDThe grammar ID.
aRuleIDThe rule ID.
aValidA reference where the validity of the rule is set.

MSrGetUtteranceDurationL ( TModelBankID, TModelID, TTimeIntervalMicroSeconds32 & )

voidMSrGetUtteranceDurationL(TModelBankIDaModelBankID,
TModelIDaModelID,
TTimeIntervalMicroSeconds32 &aDuration
)[pure virtual]

Returns the duration of the utterance for the specified model.

Since
8.0
ParameterDescription
aModelBankIDThe model bank ID.
aModelIDThe model ID.
aDurationA reference where the duration of utterance is set.

MSrLoadEngineParametersL ( const RArray< TInt > &, const RArray< TInt > & )

voidMSrLoadEngineParametersL(const RArray< TInt > &aParameterId,
const RArray< TInt > &aParameterValue
)[pure virtual]

Unloads the specified parameters to the engine.

Since
8.0
ParameterDescription
aParameterIdAn array of parameter IDs.
aParameterValueAn array of parameter values.

MSrLoadGrammarL ( TGrammarID )

voidMSrLoadGrammarL(TGrammarIDaGrammarID)[pure virtual]

Loads the specified grammar in into the recognizer; done prior to recognition.

Since
8.0
ParameterDescription
aGrammarIDThe grammar ID.

MSrLoadLexiconL ( TLexiconID )

voidMSrLoadLexiconL(TLexiconIDaLexiconID)[pure virtual]

Loads the specified lexicon into the recognizer; done prior to recognition.

Since
8.0
ParameterDescription
aLexiconIDThe lexicon ID.

MSrLoadModelsL ( TModelBankID )

voidMSrLoadModelsL(TModelBankIDaModelBankID)[pure virtual]

Loads the specified model bank into the recognizer; done prior to recognition.

Since
8.0
ParameterDescription
aModelBankIDThe model bank ID.

MSrPlayUtteranceL ( TModelBankID, TModelID )

voidMSrPlayUtteranceL(TModelBankIDaModelBankID,
TModelIDaModelID
)[pure virtual]

Plays the previously trained utterance.

Since
8.0
ParameterDescription
aModelBankIDThe model bank ID.
aModelIDThe model ID, whose utterance is played.

MSrRecognizeL ( CSDClientResultSet & )

voidMSrRecognizeL(CSDClientResultSet &aResultSet)[pure virtual]

Initiates recognition; performed following loading of model bank, lexicon, and grammar.

Since
8.0
ParameterDescription
aResultSetA reference where the recognition result is set.

MSrRecordL ( TTimeIntervalMicroSeconds32 )

voidMSrRecordL(TTimeIntervalMicroSeconds32aRecordTime)[pure virtual]

Records user utterance for training and recognition.

Since
8.0
ParameterDescription
aRecordTimeA recording time in microseconds.

MSrRemoveGrammarL ( TGrammarID )

voidMSrRemoveGrammarL(TGrammarIDaGrammarID)[pure virtual]

Removes the specified grammar from the permanent storage.

Removing a grammar will remove all rules within the grammar.

Since
8.0
ParameterDescription
aGrammarIDThe grammar ID.

MSrRemoveLexiconL ( TLexiconID )

voidMSrRemoveLexiconL(TLexiconIDaLexiconID)[pure virtual]

Removes the specified lexicon from the permanent storage.

Removing a lexicon will remove all pronunciations within the lexicon.

Since
8.0
ParameterDescription
aLexiconIDThe lexicon ID.

MSrRemoveModelBankL ( TModelBankID )

voidMSrRemoveModelBankL(TModelBankIDaModelBankID)[pure virtual]

Removes the specified model bank from the permanent storage.

Removing a model bank will remove all models within the model bank.

Since
8.0
ParameterDescription
aModelBankIDThe model bank ID.

MSrRemoveModelL ( TModelBankID, TModelID )

voidMSrRemoveModelL(TModelBankIDaModelBankID,
TModelIDaModelID
)[pure virtual]

Removes the specified model from the specified model bank permanently.

Since
8.0
ParameterDescription
aModelBankIDThe model bank ID.
aModelIDThe model ID.

MSrRemovePronunciationL ( TLexiconID, TPronunciationID )

voidMSrRemovePronunciationL(TLexiconIDaLexiconID,
TPronunciationIDaPronunciationID
)[pure virtual]

Removes the specified pronunciation from the specified lexicon permanently.

Since
8.0
ParameterDescription
aLexiconIDThe lexicon ID.
aPronunciationIDThe pronunciation ID.

MSrRemoveRuleL ( TGrammarID, TRuleID )

voidMSrRemoveRuleL(TGrammarIDaGrammarID,
TRuleIDaRuleID
)[pure virtual]

Removes the specified rule from the specified grammar permanently.

Since
8.0
ParameterDescription
aGrammarIDThe grammar ID.
aRuleIDThe rule ID.

MSrSetClientUid ( TUid )

voidMSrSetClientUid(TUidaClientUid)[pure virtual]

Sets the specified grammar client UID.

ParameterDescription
aClientUidThe client UID.

MSrStartRecSessionL ( TRecognitionMode )

voidMSrStartRecSessionL(TRecognitionModeaMode)[pure virtual]

Starts a new recognition session.

Since
8.0
ParameterDescription
aModeThe recognition mode.

MSrTrainL ( TModelBankID, TModelID & )

voidMSrTrainL(TModelBankIDaModelBankID,
TModelID &aModelID
)[pure virtual]

Trains a new model into the specified model bank.

Since
8.0
ParameterDescription
aModelBankIDThe model bank ID.
aModelIDA reference to where the new model ID is assigned.

MSrUnloadRuleL ( TGrammarID, TRuleID )

voidMSrUnloadRuleL(TGrammarIDaGrammarID,
TRuleIDaRuleID
)[pure virtual]

Unloads the specified rule from the specified grammar in temporary memory, previously loaded with LoadGrammarL().

The rule in the permanent storage remains intact.

Since
8.0
ParameterDescription
aGrammarIDThe grammar ID.
aRuleIDThe rule ID.