MSISpeechRecognitionCustomCommandImplementor Class Reference

class MSISpeechRecognitionCustomCommandImplementor

This is the main class of Speaker Independent Custom Commands Implementor

NssSiSpeechRecognitionCustomCommands.lib
Since
2.8
Public Member Functions
voidMSrActivateGrammarL(TSIGrammarID)
voidMSrAdaptL(CSIClientResultSet &, TInt)
voidMSrAddPronunciationL(TSILexiconID, const TDesC &, TLanguage, TSIPronunciationID &)
voidMSrAddRuleL(TSIGrammarID, TSILexiconID, TSIPronunciationID, TSIRuleID &)
voidMSrAddRuleVariantL(TSIGrammarID, TSILexiconID, RArray< TSIPronunciationID > &, TSIRuleID, TSIRuleVariantID &)
voidMSrAddSindeVoiceTagL(MDesCArray &, RArray< RLanguageArray > &, TSILexiconID, TSIGrammarID, TSIRuleID &)
voidMSrAddSindeVoiceTagsL(RPointerArray< MDesCArray > *, RArray< RLanguageArray > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &)
voidMSrAddVoiceTagL(MDesCArray &, RArray< TLanguage > &, TSILexiconID, TSIGrammarID, TSIRuleID &)
voidMSrAddVoiceTagsL(RPointerArray< MDesCArray > *, RArray< TLanguage > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &)
voidMSrCancel()
voidMSrCommitChangesL()
voidMSrCreateGrammarL(TSIGrammarID &)
voidMSrCreateLexiconL(TSILexiconID &)
voidMSrCreateModelBankL(TSIModelBankID &)
voidMSrCreateRuleL(TSIGrammarID, TSIRuleID &)
voidMSrDeactivateGrammarL(TSIGrammarID)
voidMSrEndRecSessionL()
voidMSrEndRecordL()
voidMSrGetAllClientGrammarIDsL(RArray< TSIGrammarID > &)
voidMSrGetAllClientLexiconIDsL(RArray< TSILexiconID > &)
voidMSrGetAllClientModelBankIDsL(RArray< TSIModelBankID > &)
voidMSrGetAllGrammarIDsL(RArray< TSIGrammarID > &)
voidMSrGetAllLexiconIDsL(RArray< TSILexiconID > &)
voidMSrGetAllModelBankIDsL(RArray< TSIModelBankID > &)
voidMSrGetAllPronunciationIDsL(TSILexiconID, RArray< TSIPronunciationID > &)
voidMSrGetAllRuleIDsL(TSIGrammarID, RArray< TSIRuleID > &)
voidMSrGetEnginePropertiesL(const RArray< TInt > &, RArray< TInt > &)
voidMSrGetRuleValidityL(TSIGrammarID, TSIRuleID, TBool &)
voidMSrLoadEngineParametersL(const RArray< TInt > &, const RArray< TInt > &)
voidMSrLoadGrammarL(TSIGrammarID)
voidMSrLoadLexiconL(TSILexiconID)
voidMSrLoadModelsL(TSIModelBankID)
voidMSrPreStartSamplingL()
voidMSrRecognizeL(CSIClientResultSet &)
voidMSrRecordL(TTimeIntervalMicroSeconds32)
voidMSrRemoveGrammarL(TSIGrammarID)
voidMSrRemoveLexiconL(TSILexiconID)
voidMSrRemoveModelBankL(TSIModelBankID)
voidMSrRemoveModelL(TSIModelBankID, TSIModelID)
voidMSrRemovePronunciationL(TSILexiconID, TSIPronunciationID)
voidMSrRemoveRuleL(TSIGrammarID, TSIRuleID)
voidMSrRemoveRulesL(TSIGrammarID, RArray< TSIRuleID > &)
voidMSrSetClientUid(TUid)
voidMSrStartRecSessionL(TNSSRecognitionMode)
voidMSrUnloadGrammarL(TSIGrammarID)
voidMSrUnloadRuleL(TSIGrammarID, TSIRuleID)
Private Attributes
TAny *iReservedPtr_1
TAny *iReservedPtr_2

Member Functions Documentation

MSrActivateGrammarL(TSIGrammarID)

voidMSrActivateGrammarL(TSIGrammarIDaGrammarID)[pure virtual]

Activates the specified grammar, which has been previously deactivated.

Since
2.8

Parameters

TSIGrammarID aGrammarIDgrammar Id

MSrAdaptL(CSIClientResultSet &, TInt)

voidMSrAdaptL(CSIClientResultSet &aResultSet,
TIntaCorrect
)[pure virtual]

Adapts speaker independent models according using a correct recognition result.

Since
2.8

Parameters

CSIClientResultSet & aResultSetThe result N-Best containing feature vectors aCorrect The correct index
TInt aCorrect

MSrAddPronunciationL(TSILexiconID, const TDesC &, TLanguage, TSIPronunciationID &)

voidMSrAddPronunciationL(TSILexiconIDaLexiconID,
const TDesC &aTrainText,
TLanguageaLanguage,
TSIPronunciationID &aPronunciationID
)[pure virtual]

Adds a pronunciation to the given lexicon.

Since
2.8

Parameters

TSILexiconID aLexiconIDThe lexicon Id
const TDesC & aTrainTextText to be pronounced
TLanguage aLanguagePronunciation language
TSIPronunciationID & aPronunciationIDReference where a new pronunciation Id is assigned to.

MSrAddRuleL(TSIGrammarID, TSILexiconID, TSIPronunciationID, TSIRuleID &)

voidMSrAddRuleL(TSIGrammarIDaGrammarID,
TSILexiconIDaLexiconID,
TSIPronunciationIDaPronunciationID,
TSIRuleID &aRuleID
)[pure virtual]
Adds a new rule for the given pronunciation into the specified grammar.
Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar Id, where the new rule is added to
TSILexiconID aLexiconIDlexicon Id
TSIPronunciationID aPronunciationIDpronunciation Id
TSIRuleID & aRuleIDreference where a new rule Id is assigned to

MSrAddRuleVariantL(TSIGrammarID, TSILexiconID, RArray< TSIPronunciationID > &, TSIRuleID, TSIRuleVariantID &)

voidMSrAddRuleVariantL(TSIGrammarIDaGrammarID,
TSILexiconIDaLexiconID,
RArray< TSIPronunciationID > &aPronunciationIDs,
TSIRuleIDaRuleID,
TSIRuleVariantID &aRuleVariantID
)[pure virtual]

Adds a rule variant to a grammar.

Since
2.8

Parameters

TSIGrammarID aGrammarIDGrammar identifier
TSILexiconID aLexiconID
RArray< TSIPronunciationID > & aPronunciationIDs
TSIRuleID aRuleIDRule identifier; variant is added here.
TSIRuleVariantID & aRuleVariantIDReference where the new variant identifier is assigned to.

MSrAddSindeVoiceTagL(MDesCArray &, RArray< RLanguageArray > &, TSILexiconID, TSIGrammarID, TSIRuleID &)

voidMSrAddSindeVoiceTagL(MDesCArray &aTrainArray,
RArray< RLanguageArray > &aLanguageArray,
TSILexiconIDaLexiconID,
TSIGrammarIDaGrammarID,
TSIRuleID &aRuleID
)[pure virtual]

Trains one SINDE voice tag. Adds the text to the lexicon, and creates the required rules and rule variants.

Since
3.1

Parameters

MDesCArray & aTrainArrayThe phrase to be trained, split into subwords
RArray< RLanguageArray > & aLanguageArrayThe pronunciation languages for each of the
TSILexiconID aLexiconIDLexicon identifier
TSIGrammarID aGrammarIDGrammar identifier
TSIRuleID & aRuleIDReference, where the new rule identifier is assigned to.

MSrAddSindeVoiceTagsL(RPointerArray< MDesCArray > *, RArray< RLanguageArray > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &)

voidMSrAddSindeVoiceTagsL(RPointerArray< MDesCArray > *aTrainArray,
RArray< RLanguageArray > &aLanguageArray,
TSILexiconIDaLexiconID,
TSIGrammarIDaGrammarID,
RArray< TSIRuleID > &aRuleID
)[pure virtual]

Trains SINDE voice tags. If the training fails for some of the names (but not all), it is signaled by setting the Rule ID to KInvalidRuleID.

Since
3.1

Parameters

RPointerArray< MDesCArray > * aTrainArrayThe phrase to be trained, split into subwords
RArray< RLanguageArray > & aLanguageArrayThe pronunciation languages
TSILexiconID aLexiconIDLexicon identifier
TSIGrammarID aGrammarIDGrammar identifier
RArray< TSIRuleID > & aRuleIDReferenceto an array, where the new rule identifiers are assigned to.

MSrAddVoiceTagL(MDesCArray &, RArray< TLanguage > &, TSILexiconID, TSIGrammarID, TSIRuleID &)

voidMSrAddVoiceTagL(MDesCArray &aTrainArray,
RArray< TLanguage > &aLanguageArray,
TSILexiconIDaLexiconID,
TSIGrammarIDaGrammarID,
TSIRuleID &aRuleID
)[pure virtual]

Trains a voice tag. Adds the text to the lexicon, and creates the required rules and rule variants.

Since
2.8

Parameters

MDesCArray & aTrainArrayThe phrase to be trained, split into subwords
RArray< TLanguage > & aLanguageArrayThe pronunciaiton languages
TSILexiconID aLexiconIDLexicon identifier
TSIGrammarID aGrammarIDGrammar identifier
TSIRuleID & aRuleIDReference, where the new rule identifier is assigned to.

MSrAddVoiceTagsL(RPointerArray< MDesCArray > *, RArray< TLanguage > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &)

voidMSrAddVoiceTagsL(RPointerArray< MDesCArray > *aTrainArray,
RArray< TLanguage > &aLanguageArray,
TSILexiconIDaLexiconID,
TSIGrammarIDaGrammarID,
RArray< TSIRuleID > &aRuleID
)[pure virtual]

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.

Since
2.8

Parameters

RPointerArray< MDesCArray > * aTrainArrayThe phrase to be trained, split into subwords
RArray< TLanguage > & aLanguageArrayThe pronunciation languages
TSILexiconID aLexiconIDLexicon identifier
TSIGrammarID aGrammarIDGrammar identifier
RArray< TSIRuleID > & aRuleIDReferenceto an array, where the new Rule identifiers are assigned to.

MSrCancel()

voidMSrCancel()[pure virtual]
Cancels the current operation
Since
2.0

MSrCommitChangesL()

voidMSrCommitChangesL()[pure virtual]
Saves the current changes into a permanent storage.
Since
2.0

MSrCreateGrammarL(TSIGrammarID &)

voidMSrCreateGrammarL(TSIGrammarID &aGrammarID)[pure virtual]
Creates a new grammar.
Since
2.0

Parameters

TSIGrammarID & aGrammarIDreference where grammar ID is stored

MSrCreateLexiconL(TSILexiconID &)

voidMSrCreateLexiconL(TSILexiconID &aLexiconID)[pure virtual]
Creates a new lexicon.
Since
2.0

Parameters

TSILexiconID & aLexiconIDreference where lexicon ID is stored

MSrCreateModelBankL(TSIModelBankID &)

voidMSrCreateModelBankL(TSIModelBankID &aModelBankID)[pure virtual]
Creates a new model bank.
Since
2.0

Parameters

TSIModelBankID & aModelBankIDreference where a new model bank Id is assigned to

MSrCreateRuleL(TSIGrammarID, TSIRuleID &)

voidMSrCreateRuleL(TSIGrammarIDaGrammarID,
TSIRuleID &aRuleID
)[pure virtual]

Creates a new rule.

Since
2.8

Parameters

TSIGrammarID aGrammarIDGrammar identifier
TSIRuleID & aRuleIDReference where rule ID is stored

MSrDeactivateGrammarL(TSIGrammarID)

voidMSrDeactivateGrammarL(TSIGrammarIDaGrammarID)[pure virtual]

Deactivates a loaded grammar so that it is not recognized.

Since
2.8

Parameters

TSIGrammarID aGrammarIDgrammar Id

MSrEndRecSessionL()

voidMSrEndRecSessionL()[pure virtual]
Ends the current recognition session. Resources allocated for recognition are freed.
Since
2.0

MSrEndRecordL()

voidMSrEndRecordL()[pure virtual]

Stops recognition. Unlike Cancel(), this function gives the recognition result, if it can be guessed.

Since
2.8

MSrGetAllClientGrammarIDsL(RArray< TSIGrammarID > &)

voidMSrGetAllClientGrammarIDsL(RArray< TSIGrammarID > &aGrammarIDs)[pure virtual]
Returns all grammar Ids that belong to the current client, whose UID was set with MSrSetClientUid().
Since
2.0

Parameters

RArray< TSIGrammarID > & aGrammarIDsreference where grammar Ids are stored

MSrGetAllClientLexiconIDsL(RArray< TSILexiconID > &)

voidMSrGetAllClientLexiconIDsL(RArray< TSILexiconID > &aLexiconIDs)[pure virtual]
Returns all lexicon Ids that belong to the current client, whose UID was set with MSrSetClientUid().
Since
2.0

Parameters

RArray< TSILexiconID > & aLexiconIDsreference where lexicon Ids are stored

MSrGetAllClientModelBankIDsL(RArray< TSIModelBankID > &)

voidMSrGetAllClientModelBankIDsL(RArray< TSIModelBankID > &aModelBankIDs)[pure virtual]
Returns all model bank Ids that belong to the current client, whose UID was set with MSrSetClientUid().
Since
2.0

Parameters

RArray< TSIModelBankID > & aModelBankIDsreference where model bank Ids are stored

MSrGetAllGrammarIDsL(RArray< TSIGrammarID > &)

voidMSrGetAllGrammarIDsL(RArray< TSIGrammarID > &aGrammarIDs)[pure virtual]
Returns all grammar Ids that exist (for all clients).
Since
2.0

Parameters

RArray< TSIGrammarID > & aGrammarIDsreference where grammar Ids are stored

MSrGetAllLexiconIDsL(RArray< TSILexiconID > &)

voidMSrGetAllLexiconIDsL(RArray< TSILexiconID > &aLexiconIDs)[pure virtual]
Returns all lexicon Ids that exist (for all clients).
Since
2.0

Parameters

RArray< TSILexiconID > & aLexiconIDsreference where lexicon Ids are stored

MSrGetAllModelBankIDsL(RArray< TSIModelBankID > &)

voidMSrGetAllModelBankIDsL(RArray< TSIModelBankID > &aModelBankIDs)[pure virtual]
Returns all model bank Ids that exist (for all clients).
Since
2.0

Parameters

RArray< TSIModelBankID > & aModelBankIDsreference where model bank Ids are stored

MSrGetAllPronunciationIDsL(TSILexiconID, RArray< TSIPronunciationID > &)

voidMSrGetAllPronunciationIDsL(TSILexiconIDaLexiconID,
RArray< TSIPronunciationID > &aPronunciationIDs
)[pure virtual]
Returns all pronunciation Ids that exist in the specified lexicon.
Since
2.0

Parameters

TSILexiconID aLexiconIDlexicon Id aPronunciationIDs reference where pronunciation Ids are stored
RArray< TSIPronunciationID > & aPronunciationIDs

MSrGetAllRuleIDsL(TSIGrammarID, RArray< TSIRuleID > &)

voidMSrGetAllRuleIDsL(TSIGrammarIDaGrammarID,
RArray< TSIRuleID > &aRuleIDs
)[pure virtual]
Returns all rule Ids that exist in the specified grammar.
Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar Id aRuleIDs reference where rule Ids are stored
RArray< TSIRuleID > & aRuleIDs

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
2.0

Parameters

const RArray< TInt > & aPropertyIdconstant reference to array of engine property Ids
RArray< TInt > & aPropertyValuereference to array of engine property values

MSrGetRuleValidityL(TSIGrammarID, TSIRuleID, TBool &)

voidMSrGetRuleValidityL(TSIGrammarIDaGrammarID,
TSIRuleIDaRuleID,
TBool &aValid
)[pure virtual]
Checks if the rule is valid or not.
Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar Id aRuleID rule Id aValid reference where the validity of the rule is set
TSIRuleID aRuleID
TBool & aValid

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
2.0

Parameters

const RArray< TInt > & aParameterIdarray of parameter IDs
const RArray< TInt > & aParameterValuearray of parameter values

MSrLoadGrammarL(TSIGrammarID)

voidMSrLoadGrammarL(TSIGrammarIDaGrammarID)[pure virtual]
Loads the specified grammar into the reocgnizer; done prior to recognition.
Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar Id

MSrLoadLexiconL(TSILexiconID)

voidMSrLoadLexiconL(TSILexiconIDaLexiconID)[pure virtual]
Loads the specified lexicon into the recognizer; done prior to recognition.
Since
2.0

Parameters

TSILexiconID aLexiconIDlexicon ID

MSrLoadModelsL(TSIModelBankID)

voidMSrLoadModelsL(TSIModelBankIDaModelBankID)[pure virtual]
Loads the specified model bank into the recognizer; done prior to recognition..
Since
2.0

Parameters

TSIModelBankID aModelBankID

MSrPreStartSamplingL()

voidMSrPreStartSamplingL()[pure virtual]

Pre-starts sampling before MSrRecordL call.

Since
3.2

MSrRecognizeL(CSIClientResultSet &)

voidMSrRecognizeL(CSIClientResultSet &aResultSet)[pure virtual]

Starts recognition

Since
2.8

Parameters

CSIClientResultSet & aResultSetRecognition result is placed here, when ready.

MSrRecordL(TTimeIntervalMicroSeconds32)

voidMSrRecordL(TTimeIntervalMicroSeconds32aRecordTime)[pure virtual]
Records an utterance for training and recognition.
Since
2.0

Parameters

TTimeIntervalMicroSeconds32 aRecordTimerecording time in microseconds

MSrRemoveGrammarL(TSIGrammarID)

voidMSrRemoveGrammarL(TSIGrammarIDaGrammarID)[pure virtual]
Removes the specified grammar from the permanent storage. Removing a grammar will remove all rules and rule variants within the grammar.
Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar Id

MSrRemoveLexiconL(TSILexiconID)

voidMSrRemoveLexiconL(TSILexiconIDaLexiconID)[pure virtual]
Removes the specified lexicon from the permanent storage. Removing a lexicon will remove all pronunciations within the lexicon.
Since
2.0

Parameters

TSILexiconID aLexiconIDlexicon Id

MSrRemoveModelBankL(TSIModelBankID)

voidMSrRemoveModelBankL(TSIModelBankIDaModelBankID)[pure virtual]
Removes the specified model bank from the permanent storage. Removing a model bank will remove all models within the model bank.
Since
2.0

Parameters

TSIModelBankID aModelBankIDmodel bank Id

MSrRemoveModelL(TSIModelBankID, TSIModelID)

voidMSrRemoveModelL(TSIModelBankIDaModelBankID,
TSIModelIDaModelID
)[pure virtual]
Removes the specified model from the specified model bank permanently.
Since
2.0

Parameters

TSIModelBankID aModelBankIDmodel bank Id
TSIModelID aModelIDmodel Id

MSrRemovePronunciationL(TSILexiconID, TSIPronunciationID)

voidMSrRemovePronunciationL(TSILexiconIDaLexiconID,
TSIPronunciationIDaPronunciationID
)[pure virtual]
Removes the specified pronunciation from the specified lexicon permanently.
Since
2.0

Parameters

TSILexiconID aLexiconIDlexicon Id
TSIPronunciationID aPronunciationIDpronunciation Id

MSrRemoveRuleL(TSIGrammarID, TSIRuleID)

voidMSrRemoveRuleL(TSIGrammarIDaGrammarID,
TSIRuleIDaRuleID
)[pure virtual]
Removes the specified rule from the specified grammar permanently. If the rule contains rule variants, they are also destoryed.
Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar Id
TSIRuleID aRuleIDrule Id

MSrRemoveRulesL(TSIGrammarID, RArray< TSIRuleID > &)

voidMSrRemoveRulesL(TSIGrammarIDaGrammarID,
RArray< TSIRuleID > &aRuleIDs
)[pure virtual]
Removes the specified rules from the specified grammar permanently. If the rule contains rule variants, they are also destoryed.
Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar Id
RArray< TSIRuleID > & aRuleIDsarray of rule ids

MSrSetClientUid(TUid)

voidMSrSetClientUid(TUidaClientUid)[pure virtual]
Sets the client's UID for data ownership identification.
Since
2.0

Parameters

TUid aClientUidclient's UID

MSrStartRecSessionL(TNSSRecognitionMode)

voidMSrStartRecSessionL(TNSSRecognitionModeaMode)[pure virtual]
Starts a new recognition session.
Since
2.0

Parameters

TNSSRecognitionMode aModerecognition mode

MSrUnloadGrammarL(TSIGrammarID)

voidMSrUnloadGrammarL(TSIGrammarIDaGrammarID)[pure virtual]

Deactivates a grammar.

Since
2.8

Parameters

TSIGrammarID aGrammarIDGrammar identifier

MSrUnloadRuleL(TSIGrammarID, TSIRuleID)

voidMSrUnloadRuleL(TSIGrammarIDaGrammarID,
TSIRuleIDaRuleID
)[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
2.0

Parameters

TSIGrammarID aGrammarIDgrammar Id
TSIRuleID aRuleIDrule Id

Member Data Documentation

TAny * iReservedPtr_1

TAny *iReservedPtr_1[private]

TAny * iReservedPtr_2

TAny *iReservedPtr_2[private]