MSISpeechRecognitionCustomCommandImplementor Class Reference

class MSISpeechRecognitionCustomCommandImplementor

This is the main class of Speaker Independent Custom Commands Implementor

NssSiSpeechRecognitionCustomCommands.lib
Since
2.8
Public Member Functions
void MSrActivateGrammarL ( TSIGrammarID )
void MSrAdaptL ( CSIClientResultSet &, TInt )
void MSrAddPronunciationL ( TSILexiconID , const TDesC &, TLanguage , TSIPronunciationID &)
void MSrAddRuleL ( TSIGrammarID , TSILexiconID , TSIPronunciationID , TSIRuleID &)
void MSrAddRuleVariantL ( TSIGrammarID , TSILexiconID , RArray < TSIPronunciationID > &, TSIRuleID , TSIRuleVariantID &)
void MSrAddSindeVoiceTagL (MDesCArray &, RArray < RLanguageArray > &, TSILexiconID , TSIGrammarID , TSIRuleID &)
void MSrAddSindeVoiceTagsL ( RPointerArray < MDesCArray > *, RArray < RLanguageArray > &, TSILexiconID , TSIGrammarID , RArray < TSIRuleID > &)
void MSrAddVoiceTagL (MDesCArray &, RArray < TLanguage > &, TSILexiconID , TSIGrammarID , TSIRuleID &)
void MSrAddVoiceTagsL ( RPointerArray < MDesCArray > *, RArray < TLanguage > &, TSILexiconID , TSIGrammarID , RArray < TSIRuleID > &)
void MSrCancel ()
void MSrCommitChangesL ()
void MSrCreateGrammarL ( TSIGrammarID &)
void MSrCreateLexiconL ( TSILexiconID &)
void MSrCreateModelBankL ( TSIModelBankID &)
void MSrCreateRuleL ( TSIGrammarID , TSIRuleID &)
void MSrDeactivateGrammarL ( TSIGrammarID )
void MSrEndRecSessionL ()
void MSrEndRecordL ()
void MSrGetAllClientGrammarIDsL ( RArray < TSIGrammarID > &)
void MSrGetAllClientLexiconIDsL ( RArray < TSILexiconID > &)
void MSrGetAllClientModelBankIDsL ( RArray < TSIModelBankID > &)
void MSrGetAllGrammarIDsL ( RArray < TSIGrammarID > &)
void MSrGetAllLexiconIDsL ( RArray < TSILexiconID > &)
void MSrGetAllModelBankIDsL ( RArray < TSIModelBankID > &)
void MSrGetAllPronunciationIDsL ( TSILexiconID , RArray < TSIPronunciationID > &)
void MSrGetAllRuleIDsL ( TSIGrammarID , RArray < TSIRuleID > &)
void MSrGetEnginePropertiesL (const RArray < TInt > &, RArray < TInt > &)
void MSrGetRuleValidityL ( TSIGrammarID , TSIRuleID , TBool &)
void MSrLoadEngineParametersL (const RArray < TInt > &, const RArray < TInt > &)
void MSrLoadGrammarL ( TSIGrammarID )
void MSrLoadLexiconL ( TSILexiconID )
void MSrLoadModelsL ( TSIModelBankID )
void MSrPreStartSamplingL ()
void MSrRecognizeL ( CSIClientResultSet &)
void MSrRecordL ( TTimeIntervalMicroSeconds32 )
void MSrRemoveGrammarL ( TSIGrammarID )
void MSrRemoveLexiconL ( TSILexiconID )
void MSrRemoveModelBankL ( TSIModelBankID )
void MSrRemoveModelL ( TSIModelBankID , TSIModelID )
void MSrRemovePronunciationL ( TSILexiconID , TSIPronunciationID )
void MSrRemoveRuleL ( TSIGrammarID , TSIRuleID )
void MSrRemoveRulesL ( TSIGrammarID , RArray < TSIRuleID > &)
void MSrSetClientUid ( TUid )
void MSrStartRecSessionL ( TNSSRecognitionMode )
void MSrUnloadGrammarL ( TSIGrammarID )
void MSrUnloadRuleL ( TSIGrammarID , TSIRuleID )
Private Attributes
TAny * iReservedPtr_1
TAny * iReservedPtr_2

Member Functions Documentation

MSrActivateGrammarL(TSIGrammarID)

void MSrActivateGrammarL ( TSIGrammarID aGrammarID ) [pure virtual]

Activates the specified grammar, which has been previously deactivated.

Since
2.8

Parameters

TSIGrammarID aGrammarID grammar Id

MSrAdaptL(CSIClientResultSet &, TInt)

void MSrAdaptL ( CSIClientResultSet & aResultSet,
TInt aCorrect
) [pure virtual]

Adapts speaker independent models according using a correct recognition result.

Since
2.8

Parameters

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

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

void MSrAddPronunciationL ( TSILexiconID aLexiconID,
const TDesC & aTrainText,
TLanguage aLanguage,
TSIPronunciationID & aPronunciationID
) [pure virtual]

Adds a pronunciation to the given lexicon.

Since
2.8

Parameters

TSILexiconID aLexiconID The lexicon Id
const TDesC & aTrainText Text to be pronounced
TLanguage aLanguage Pronunciation language
TSIPronunciationID & aPronunciationID Reference where a new pronunciation Id is assigned to.

MSrAddRuleL(TSIGrammarID, TSILexiconID, TSIPronunciationID, TSIRuleID &)

void MSrAddRuleL ( TSIGrammarID aGrammarID,
TSILexiconID aLexiconID,
TSIPronunciationID aPronunciationID,
TSIRuleID & aRuleID
) [pure virtual]
Adds a new rule for the given pronunciation into the specified grammar.
Since
2.0

Parameters

TSIGrammarID aGrammarID grammar Id, where the new rule is added to
TSILexiconID aLexiconID lexicon Id
TSIPronunciationID aPronunciationID pronunciation Id
TSIRuleID & aRuleID reference where a new rule Id is assigned to

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

void MSrAddRuleVariantL ( TSIGrammarID aGrammarID,
TSILexiconID aLexiconID,
RArray < TSIPronunciationID > & aPronunciationIDs,
TSIRuleID aRuleID,
TSIRuleVariantID & aRuleVariantID
) [pure virtual]

Adds a rule variant to a grammar.

Since
2.8

Parameters

TSIGrammarID aGrammarID Grammar identifier
TSILexiconID aLexiconID
RArray < TSIPronunciationID > & aPronunciationIDs
TSIRuleID aRuleID Rule identifier; variant is added here.
TSIRuleVariantID & aRuleVariantID Reference where the new variant identifier is assigned to.

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

void MSrAddSindeVoiceTagL ( MDesCArray & aTrainArray,
RArray < RLanguageArray > & aLanguageArray,
TSILexiconID aLexiconID,
TSIGrammarID aGrammarID,
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 & aTrainArray The phrase to be trained, split into subwords
RArray < RLanguageArray > & aLanguageArray The pronunciation languages for each of the
TSILexiconID aLexiconID Lexicon identifier
TSIGrammarID aGrammarID Grammar identifier
TSIRuleID & aRuleID Reference, where the new rule identifier is assigned to.

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

void MSrAddSindeVoiceTagsL ( RPointerArray < MDesCArray > * aTrainArray,
RArray < RLanguageArray > & aLanguageArray,
TSILexiconID aLexiconID,
TSIGrammarID aGrammarID,
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 > * aTrainArray The phrase to be trained, split into subwords
RArray < RLanguageArray > & 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.

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

void MSrAddVoiceTagL ( MDesCArray & aTrainArray,
RArray < TLanguage > & aLanguageArray,
TSILexiconID aLexiconID,
TSIGrammarID aGrammarID,
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 & aTrainArray The phrase to be trained, split into subwords
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.

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

void MSrAddVoiceTagsL ( RPointerArray < MDesCArray > * aTrainArray,
RArray < TLanguage > & aLanguageArray,
TSILexiconID aLexiconID,
TSIGrammarID aGrammarID,
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 > * aTrainArray The phrase to be trained, split into subwords
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.

MSrCancel()

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

MSrCommitChangesL()

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

MSrCreateGrammarL(TSIGrammarID &)

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

Parameters

TSIGrammarID & aGrammarID reference where grammar ID is stored

MSrCreateLexiconL(TSILexiconID &)

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

Parameters

TSILexiconID & aLexiconID reference where lexicon ID is stored

MSrCreateModelBankL(TSIModelBankID &)

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

Parameters

TSIModelBankID & aModelBankID reference where a new model bank Id is assigned to

MSrCreateRuleL(TSIGrammarID, TSIRuleID &)

void MSrCreateRuleL ( TSIGrammarID aGrammarID,
TSIRuleID & aRuleID
) [pure virtual]

Creates a new rule.

Since
2.8

Parameters

TSIGrammarID aGrammarID Grammar identifier
TSIRuleID & aRuleID Reference where rule ID is stored

MSrDeactivateGrammarL(TSIGrammarID)

void MSrDeactivateGrammarL ( TSIGrammarID aGrammarID ) [pure virtual]

Deactivates a loaded grammar so that it is not recognized.

Since
2.8

Parameters

TSIGrammarID aGrammarID grammar Id

MSrEndRecSessionL()

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

MSrEndRecordL()

void MSrEndRecordL ( ) [pure virtual]

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

Since
2.8

MSrGetAllClientGrammarIDsL(RArray< TSIGrammarID > &)

void MSrGetAllClientGrammarIDsL ( 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 > & aGrammarIDs reference where grammar Ids are stored

MSrGetAllClientLexiconIDsL(RArray< TSILexiconID > &)

void MSrGetAllClientLexiconIDsL ( 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 > & aLexiconIDs reference where lexicon Ids are stored

MSrGetAllClientModelBankIDsL(RArray< TSIModelBankID > &)

void MSrGetAllClientModelBankIDsL ( 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 > & aModelBankIDs reference where model bank Ids are stored

MSrGetAllGrammarIDsL(RArray< TSIGrammarID > &)

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

Parameters

RArray < TSIGrammarID > & aGrammarIDs reference where grammar Ids are stored

MSrGetAllLexiconIDsL(RArray< TSILexiconID > &)

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

Parameters

RArray < TSILexiconID > & aLexiconIDs reference where lexicon Ids are stored

MSrGetAllModelBankIDsL(RArray< TSIModelBankID > &)

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

Parameters

RArray < TSIModelBankID > & aModelBankIDs reference where model bank Ids are stored

MSrGetAllPronunciationIDsL(TSILexiconID, RArray< TSIPronunciationID > &)

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

Parameters

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

MSrGetAllRuleIDsL(TSIGrammarID, RArray< TSIRuleID > &)

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

Parameters

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

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

void MSrGetEnginePropertiesL ( 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 > & aPropertyId constant reference to array of engine property Ids
RArray < TInt > & aPropertyValue reference to array of engine property values

MSrGetRuleValidityL(TSIGrammarID, TSIRuleID, TBool &)

void MSrGetRuleValidityL ( TSIGrammarID aGrammarID,
TSIRuleID aRuleID,
TBool & aValid
) [pure virtual]
Checks if the rule is valid or not.
Since
2.0

Parameters

TSIGrammarID aGrammarID grammar 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 > &)

void MSrLoadEngineParametersL ( const RArray < TInt > & aParameterId,
const RArray < TInt > & aParameterValue
) [pure virtual]
Unloads the specified parameters to the engine.
Since
2.0

Parameters

const RArray < TInt > & aParameterId array of parameter IDs
const RArray < TInt > & aParameterValue array of parameter values

MSrLoadGrammarL(TSIGrammarID)

void MSrLoadGrammarL ( TSIGrammarID aGrammarID ) [pure virtual]
Loads the specified grammar into the reocgnizer; done prior to recognition.
Since
2.0

Parameters

TSIGrammarID aGrammarID grammar Id

MSrLoadLexiconL(TSILexiconID)

void MSrLoadLexiconL ( TSILexiconID aLexiconID ) [pure virtual]
Loads the specified lexicon into the recognizer; done prior to recognition.
Since
2.0

Parameters

TSILexiconID aLexiconID lexicon ID

MSrLoadModelsL(TSIModelBankID)

void MSrLoadModelsL ( TSIModelBankID aModelBankID ) [pure virtual]
Loads the specified model bank into the recognizer; done prior to recognition..
Since
2.0

Parameters

TSIModelBankID aModelBankID

MSrPreStartSamplingL()

void MSrPreStartSamplingL ( ) [pure virtual]

Pre-starts sampling before MSrRecordL call.

Since
3.2

MSrRecognizeL(CSIClientResultSet &)

void MSrRecognizeL ( CSIClientResultSet & aResultSet ) [pure virtual]

Starts recognition

Since
2.8

Parameters

CSIClientResultSet & aResultSet Recognition result is placed here, when ready.

MSrRecordL(TTimeIntervalMicroSeconds32)

void MSrRecordL ( TTimeIntervalMicroSeconds32 aRecordTime ) [pure virtual]
Records an utterance for training and recognition.
Since
2.0

Parameters

TTimeIntervalMicroSeconds32 aRecordTime recording time in microseconds

MSrRemoveGrammarL(TSIGrammarID)

void MSrRemoveGrammarL ( TSIGrammarID aGrammarID ) [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 aGrammarID grammar Id

MSrRemoveLexiconL(TSILexiconID)

void MSrRemoveLexiconL ( TSILexiconID aLexiconID ) [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 aLexiconID lexicon Id

MSrRemoveModelBankL(TSIModelBankID)

void MSrRemoveModelBankL ( TSIModelBankID aModelBankID ) [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 aModelBankID model bank Id

MSrRemoveModelL(TSIModelBankID, TSIModelID)

void MSrRemoveModelL ( TSIModelBankID aModelBankID,
TSIModelID aModelID
) [pure virtual]
Removes the specified model from the specified model bank permanently.
Since
2.0

Parameters

TSIModelBankID aModelBankID model bank Id
TSIModelID aModelID model Id

MSrRemovePronunciationL(TSILexiconID, TSIPronunciationID)

void MSrRemovePronunciationL ( TSILexiconID aLexiconID,
TSIPronunciationID aPronunciationID
) [pure virtual]
Removes the specified pronunciation from the specified lexicon permanently.
Since
2.0

Parameters

TSILexiconID aLexiconID lexicon Id
TSIPronunciationID aPronunciationID pronunciation Id

MSrRemoveRuleL(TSIGrammarID, TSIRuleID)

void MSrRemoveRuleL ( TSIGrammarID aGrammarID,
TSIRuleID aRuleID
) [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 aGrammarID grammar Id
TSIRuleID aRuleID rule Id

MSrRemoveRulesL(TSIGrammarID, RArray< TSIRuleID > &)

void MSrRemoveRulesL ( TSIGrammarID aGrammarID,
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 aGrammarID grammar Id
RArray < TSIRuleID > & aRuleIDs array of rule ids

MSrSetClientUid(TUid)

void MSrSetClientUid ( TUid aClientUid ) [pure virtual]
Sets the client's UID for data ownership identification.
Since
2.0

Parameters

TUid aClientUid client's UID

MSrStartRecSessionL(TNSSRecognitionMode)

void MSrStartRecSessionL ( TNSSRecognitionMode aMode ) [pure virtual]
Starts a new recognition session.
Since
2.0

Parameters

TNSSRecognitionMode aMode recognition mode

MSrUnloadGrammarL(TSIGrammarID)

void MSrUnloadGrammarL ( TSIGrammarID aGrammarID ) [pure virtual]

Deactivates a grammar.

Since
2.8

Parameters

TSIGrammarID aGrammarID Grammar identifier

MSrUnloadRuleL(TSIGrammarID, TSIRuleID)

void MSrUnloadRuleL ( TSIGrammarID aGrammarID,
TSIRuleID aRuleID
) [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 aGrammarID grammar Id
TSIRuleID aRuleID rule Id

Member Data Documentation

TAny * iReservedPtr_1

TAny * iReservedPtr_1 [private]

TAny * iReservedPtr_2

TAny * iReservedPtr_2 [private]