MSpeechRecognitionCustomCommandImplementor Class Reference

class MSpeechRecognitionCustomCommandImplementor

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

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

Member Functions 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

Parameters

TLexiconID aLexiconIDThe lexicon ID to where the new pronunciation is added.
TModelBankID aModelBankIDThe model bank ID.
TModelID aModelIDThe model ID.
TPronunciationID & 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

Parameters

TGrammarID aGrammarIDThe grammar ID, where the new rule is added to
TLexiconID aLexiconIDThe lexicon ID.
TPronunciationID aPronunciationIDThe pronunciation ID.
TRuleID & 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

Parameters

TGrammarID & aGrammarIDA reference where the grammar ID is stored.

MSrCreateLexiconL(TLexiconID &)

voidMSrCreateLexiconL(TLexiconID &aLexiconID)[pure virtual]

Creates a new lexicon.

Since
8.0

Parameters

TLexiconID & aLexiconIDA reference where the lexicon ID is stored.

MSrCreateModelBankL(TModelBankID &)

voidMSrCreateModelBankL(TModelBankID &aModelBankID)[pure virtual]

Creates a new model bank.

Since
8.0

Parameters

TModelBankID & 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

Parameters

RArray< TGrammarID > & 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

Parameters

RArray< TLexiconID > & 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

Parameters

RArray< TModelBankID > & aModelBankIDsA reference where model bank IDs are stored.

MSrGetAllGrammarIDsL(RArray< TGrammarID > &)

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

Returns all grammar IDs.

Parameters

RArray< TGrammarID > & aGrammarIDsA reference where grammar IDs are stored.

MSrGetAllLexiconIDsL(RArray< TLexiconID > &)

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

Returns all lexicon IDs.

Parameters

RArray< TLexiconID > & aLexiconIDsA reference where lexicon IDs are stored.

MSrGetAllModelBankIDsL(RArray< TModelBankID > &)

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

Returns all modelbank IDs.

Since
8.0

Parameters

RArray< TModelBankID > & 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

Parameters

TModelBankID aModelBankIDThe model bank ID.
RArray< TModelID > & 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

Parameters

TLexiconID aLexiconIDThe lexicon ID.
RArray< TPronunciationID > & 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

Parameters

TGrammarID aGrammarIDThe grammar ID.
RArray< TRuleID > & 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

Parameters

TInt & 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

Parameters

const RArray< TInt > & aPropertyIdA constant reference to an array of engine property IDs.
RArray< TInt > & 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

Parameters

TModelBankID aModelBankIDThe model bank ID.
TInt & 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

Parameters

TGrammarID aGrammarIDThe grammar ID.
TRuleID aRuleIDThe rule ID.
TBool & 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

Parameters

TModelBankID aModelBankIDThe model bank ID.
TModelID aModelIDThe model ID.
TTimeIntervalMicroSeconds32 & 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

Parameters

const RArray< TInt > & aParameterIdAn array of parameter IDs.
const RArray< TInt > & 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

Parameters

TGrammarID aGrammarIDThe grammar ID.

MSrLoadLexiconL(TLexiconID)

voidMSrLoadLexiconL(TLexiconIDaLexiconID)[pure virtual]

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

Since
8.0

Parameters

TLexiconID aLexiconIDThe lexicon ID.

MSrLoadModelsL(TModelBankID)

voidMSrLoadModelsL(TModelBankIDaModelBankID)[pure virtual]

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

Since
8.0

Parameters

TModelBankID aModelBankIDThe model bank ID.

MSrPlayUtteranceL(TModelBankID, TModelID)

voidMSrPlayUtteranceL(TModelBankIDaModelBankID,
TModelIDaModelID
)[pure virtual]

Plays the previously trained utterance.

Since
8.0

Parameters

TModelBankID aModelBankIDThe model bank ID.
TModelID 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

Parameters

CSDClientResultSet & aResultSetA reference where the recognition result is set.

MSrRecordL(TTimeIntervalMicroSeconds32)

voidMSrRecordL(TTimeIntervalMicroSeconds32aRecordTime)[pure virtual]

Records user utterance for training and recognition.

Since
8.0

Parameters

TTimeIntervalMicroSeconds32 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

Parameters

TGrammarID 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

Parameters

TLexiconID 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

Parameters

TModelBankID 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

Parameters

TModelBankID aModelBankIDThe model bank ID.
TModelID aModelIDThe model ID.

MSrRemovePronunciationL(TLexiconID, TPronunciationID)

voidMSrRemovePronunciationL(TLexiconIDaLexiconID,
TPronunciationIDaPronunciationID
)[pure virtual]

Removes the specified pronunciation from the specified lexicon permanently.

Since
8.0

Parameters

TLexiconID aLexiconIDThe lexicon ID.
TPronunciationID aPronunciationIDThe pronunciation ID.

MSrRemoveRuleL(TGrammarID, TRuleID)

voidMSrRemoveRuleL(TGrammarIDaGrammarID,
TRuleIDaRuleID
)[pure virtual]

Removes the specified rule from the specified grammar permanently.

Since
8.0

Parameters

TGrammarID aGrammarIDThe grammar ID.
TRuleID aRuleIDThe rule ID.

MSrSetClientUid(TUid)

voidMSrSetClientUid(TUidaClientUid)[pure virtual]

Sets the specified grammar client UID.

Parameters

TUid aClientUidThe client UID.

MSrStartRecSessionL(TRecognitionMode)

voidMSrStartRecSessionL(TRecognitionModeaMode)[pure virtual]

Starts a new recognition session.

Since
8.0

Parameters

TRecognitionMode aModeThe recognition mode.

MSrTrainL(TModelBankID, TModelID &)

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

Trains a new model into the specified model bank.

Since
8.0

Parameters

TModelBankID aModelBankIDThe model bank ID.
TModelID & 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

Parameters

TGrammarID aGrammarIDThe grammar ID.
TRuleID aRuleIDThe rule ID.