CSISpeechRecognitionUtility Class Reference

class CSISpeechRecognitionUtility : public CBase

This is the main class of Speech Recognition Utility

nsssispeechrecognitionutility.lib
Since
2.0

Inherits from

  • CSISpeechRecognitionUtility
Public Member Functions
~CSISpeechRecognitionUtility ()
IMPORT_C TInt ActivateGrammar ( TSIGrammarID )
IMPORT_C TInt Adapt (const CSIClientResultSet &, TInt )
IMPORT_C TInt AddPronunciation ( TSILexiconID , const TDesC &, TLanguage , TSIPronunciationID &)
IMPORT_C TInt AddRule ( TSIGrammarID , TSILexiconID , TSIPronunciationID , TSIRuleID &)
IMPORT_C TInt AddRuleVariant ( TSIGrammarID , TSILexiconID , RArray < TSIPronunciationID > &, TSIRuleID , TSIRuleVariantID &)
IMPORT_C TInt AddVoiceTag (MDesCArray &, const RArray < TLanguage > &, TSILexiconID , TSIGrammarID , TSIRuleID &)
IMPORT_C TInt AddVoiceTag (MDesCArray &, const RArray < RLanguageArray > &, TSILexiconID , TSIGrammarID , TSIRuleID &)
IMPORT_C TInt AddVoiceTags (const RPointerArray < MDesCArray > &, const RArray < TLanguage > &, TSILexiconID , TSIGrammarID , RArray < TSIRuleID > &)
IMPORT_C TInt AddVoiceTags (const RPointerArray < MDesCArray > &, const RArray < RLanguageArray > &, TSILexiconID , TSIGrammarID , RArray < TSIRuleID > &)
IMPORT_C void Cancel ()
IMPORT_C TInt CommitChanges ()
IMPORT_C TInt CreateGrammar ( TSIGrammarID &)
IMPORT_C TAny * CreateInstanceL ()
IMPORT_C void CreateInstanceSecondPhaseL ( TUid , TUid , MSISpeechRecognitionUtilityObserver &)
IMPORT_C TInt CreateLexicon ( TSILexiconID &)
IMPORT_C TInt CreateModelBank ( TSIModelBankID &)
IMPORT_C TInt CreateRule ( TSIGrammarID , TSIRuleID &)
IMPORT_C TInt DeactivateGrammar ( TSIGrammarID )
IMPORT_C TInt EndRecSession ()
IMPORT_C TInt EndRecord ()
IMPORT_C TInt GetAllClientGrammarIDs ( RArray < TSIGrammarID > &)
IMPORT_C TInt GetAllClientLexiconIDs ( RArray < TSILexiconID > &)
IMPORT_C TInt GetAllClientModelBankIDs ( RArray < TSIModelBankID > &)
IMPORT_C TInt GetAllGrammarIDs ( RArray < TSIGrammarID > &)
IMPORT_C TInt GetAllLexiconIDs ( RArray < TSILexiconID > &)
IMPORT_C TInt GetAllModelBankIDs ( RArray < TSIModelBankID > &)
IMPORT_C TInt GetAllModelIDs ( TSIModelBankID , RArray < TSIModelID > &)
IMPORT_C TInt GetAllPronunciationIDs ( TSILexiconID , RArray < TSIPronunciationID > &)
IMPORT_C TInt GetAllRuleIDs ( TSIGrammarID , RArray < TSIRuleID > &)
IMPORT_C TInt GetEngineProperties (const RArray < TInt > &, RArray < TInt > &)
IMPORT_C TInt GetModelCount ( TSIModelBankID , TInt &)
IMPORT_C TInt GetRuleValidity ( TSIGrammarID , TSIRuleID , TBool &)
void HandleEvent (const TMMFEvent &)
IMPORT_C TInt LoadEngineParameters (const RArray < TInt > &, const RArray < TInt > &)
IMPORT_C TInt LoadGrammar ( TSIGrammarID )
IMPORT_C TInt LoadLexicon ( TSILexiconID )
IMPORT_C TInt LoadModels ( TSIModelBankID )
IMPORT_C CSISpeechRecognitionUtility * NewL ( MSISpeechRecognitionUtilityObserver &, TUid )
IMPORT_C CSISpeechRecognitionUtility * NewL ( MSISpeechRecognitionUtilityObserver &, TUid , TNSSRecognitionMode )
IMPORT_C CSISpeechRecognitionUtility * NewL ( MSISpeechRecognitionUtilityObserver &, TUid , TUid )
IMPORT_C CSISpeechRecognitionUtility * NewLC ( MSISpeechRecognitionUtilityObserver &, TUid )
IMPORT_C TInt PreStartSampling ()
IMPORT_C TInt Recognize ( CSIClientResultSet &)
IMPORT_C TInt Record ( TTimeIntervalMicroSeconds32 )
IMPORT_C TInt RemoveGrammar ( TSIGrammarID )
IMPORT_C TInt RemoveLexicon ( TSILexiconID )
IMPORT_C TInt RemoveModel ( TSIModelBankID , TSIModelID )
IMPORT_C TInt RemoveModelBank ( TSIModelBankID )
IMPORT_C TInt RemovePronunciation ( TSILexiconID , TSIPronunciationID )
IMPORT_C TInt RemoveRule ( TSIGrammarID , TSIRuleID )
IMPORT_C TInt RemoveRules ( TSIGrammarID , RArray < TSIRuleID > &)
IMPORT_C TInt SetAudioPriority ( TInt , TInt , TInt , TInt )
IMPORT_C void SetEventHandler ( MSISpeechRecognitionUtilityObserver *)
IMPORT_C TInt StartRecSession ( TNSSRecognitionMode )
IMPORT_C TInt UnloadGrammar ( TSIGrammarID )
IMPORT_C TInt UnloadRule ( TSIGrammarID , TSIRuleID )
Private Member Functions
CSISpeechRecognitionUtility ( MSISpeechRecognitionUtilityObserver &)
CSISpeechRecognitionUtility ()
void ConstructL ( TUid , TUid , MSISpeechRecognitionUtilityObserver &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
TInt iAudioPriority
TUid iClientUid
CMMFControllerEventMonitor * iControllerEventMonitor
TSIGrammarID iGrammarID
RArray < TSIGrammarID > * iGrammarIDs
TBool iInternalCommand
TSILexiconID iLexiconID
RArray < TSILexiconID > * iLexiconIDs
RMMFController iMMFController
TSIModelBankID iModelBankID
RArray < TSIModelBankID > * iModelBankIDs
TInt iModelCount
RArray < TSIModelID > * iModelIDs
TInt iPlaybackPreference
TInt iPronunciationCount
RArray < TSIPronunciationID > * iPronunciationIDs
TInt iRecognitionPreference
TAny * iReservedPtr_1
TAny * iReservedPtr_2
CSDClientResultSet * iResultSet
TInt iRuleCount
RArray < TSIRuleID > * iRuleIDs
CSIClientResultSet * iSIResultSet
MSISpeechRecognitionUtilityObserver * iSpeechRecognitionUtilityObserver
RSISpeechRecognitionCustomCommands iSrCustomCommands
TInt iTrainPreference

Constructor & Destructor Documentation

CSISpeechRecognitionUtility(MSISpeechRecognitionUtilityObserver &)

CSISpeechRecognitionUtility ( MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver ) [private]

Private C++ constructor for this class.

Since
2.0

Parameters

MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver reference to event observer class

CSISpeechRecognitionUtility()

CSISpeechRecognitionUtility ( ) [private]

Default C++ constructor

~CSISpeechRecognitionUtility()

IMPORT_C ~CSISpeechRecognitionUtility ( )

Destructor

Since
2.0

Member Functions Documentation

ActivateGrammar(TSIGrammarID)

IMPORT_C TInt ActivateGrammar ( TSIGrammarID aGrammarID )

Reactivates a previously deactivated grammar.

Since
2.0

Parameters

TSIGrammarID aGrammarID grammar ID

Adapt(const CSIClientResultSet &, TInt)

IMPORT_C TInt Adapt ( const CSIClientResultSet & aResultSet,
TInt aCorrect
)

Adapts the speaker independent models to a specific speaker's voice.

Since
2.8

Parameters

const CSIClientResultSet & aResultSet Recognition result N-Best
TInt aCorrect Index to N-Best pointing the correct result.

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

IMPORT_C TInt AddPronunciation ( TSILexiconID aLexiconID,
const TDesC & aTextForTraining,
TLanguage aLanguage,
TSIPronunciationID & aPronunciationID
)

Adds a new pronunciation for the given text phrase into the specified lexicon.

Since
2.8

Parameters

TSILexiconID aLexiconID lexicon Id, where the new pronunciation is added to aTextForTraining Text to be trained aLanguage Pronunciation language aPronunciationID reference where a new pronunciation Id is assigned to
const TDesC & aTextForTraining
TLanguage aLanguage
TSIPronunciationID & aPronunciationID

AddRule(TSIGrammarID, TSILexiconID, TSIPronunciationID, TSIRuleID &)

IMPORT_C TInt AddRule ( TSIGrammarID aGrammarID,
TSILexiconID aLexiconID,
TSIPronunciationID aPronunciationID,
TSIRuleID & aRuleID
)

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

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

IMPORT_C TInt AddRuleVariant ( TSIGrammarID aGrammarID,
TSILexiconID aLexiconID,
RArray < TSIPronunciationID > & aPronunciationIDs,
TSIRuleID aRuleID,
TSIRuleVariantID & aRuleVariantID
)

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

Since
2.8

Parameters

TSIGrammarID aGrammarID grammar Id, where the new rule is added to
TSILexiconID aLexiconID
RArray < TSIPronunciationID > & aPronunciationIDs the phrase is the concatenation of these pronunciation IDs
TSIRuleID aRuleID the rule Id, which will contain this variant
TSIRuleVariantID & aRuleVariantID reference where a new rule variant Id is assigned to

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

IMPORT_C TInt AddVoiceTag ( MDesCArray & aTextArray,
const RArray < TLanguage > & aLanguageArray,
TSILexiconID aLexiconID,
TSIGrammarID aGrammarID,
TSIRuleID & aRuleID
)

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

Since
2.8

Parameters

MDesCArray & aTextArray the text to be trained, divided in to words. The phrase is the concatenation of these words.
const RArray < TLanguage > & aLanguageArray pronunciations will be generated for these languages
TSILexiconID aLexiconID lexicon, where to add pronunciations
TSIGrammarID aGrammarID grammar, where to add rules
TSIRuleID & aRuleID the ID of the rule will be placed on this variable.

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

IMPORT_C TInt AddVoiceTag ( MDesCArray & aTextArray,
const RArray < RLanguageArray > & aLanguageArray,
TSILexiconID aLexiconID,
TSIGrammarID aGrammarID,
TSIRuleID & aRuleID
)

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

Since
3.1

Parameters

MDesCArray & aTextArray The text to be trained, divided in to words. The phrase is the concatenation of these words.
const RArray < RLanguageArray > & aLanguageArray Pronunciations will be generated for these languages
TSILexiconID aLexiconID Lexicon, where to add pronunciations
TSIGrammarID aGrammarID Grammar, where to add rules
TSIRuleID & aRuleID The ID of the rule will be placed on this variable.

AddVoiceTags(const RPointerArray< MDesCArray > &, const RArray< TLanguage > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &)

IMPORT_C TInt AddVoiceTags ( const RPointerArray < MDesCArray > & aTextArrayArray,
const RArray < TLanguage > & aLanguageArray,
TSILexiconID aLexiconID,
TSIGrammarID aGrammarID,
RArray < TSIRuleID > & aRuleIDArray
)

Adds a new rules for the given phrases into the specified grammar.

Since
2.8

Parameters

const RPointerArray < MDesCArray > & aTextArrayArray Array of text arrays. The phrase k is the concatenation of texts in array k.
const RArray < TLanguage > & aLanguageArray pronunciations will be generated for these languages
TSILexiconID aLexiconID lexicon, where to add pronunciations
TSIGrammarID aGrammarID grammar, where to add rules
RArray < TSIRuleID > & aRuleIDArray

AddVoiceTags(const RPointerArray< MDesCArray > &, const RArray< RLanguageArray > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &)

IMPORT_C TInt AddVoiceTags ( const RPointerArray < MDesCArray > & aTextArrayArray,
const RArray < RLanguageArray > & aLanguageArray,
TSILexiconID aLexiconID,
TSIGrammarID aGrammarID,
RArray < TSIRuleID > & aRuleIDArray
)

Adds a new rules for the given phrases into the specified grammar.

Since
3.1

Parameters

const RPointerArray < MDesCArray > & aTextArrayArray Array of text arrays. The phrase k is the concatenation of texts in array k.
const RArray < RLanguageArray > & aLanguageArray pronunciations will be generated for these languages
TSILexiconID aLexiconID lexicon, where to add pronunciations
TSIGrammarID aGrammarID grammar, where to add rules
RArray < TSIRuleID > & aRuleIDArray

Cancel()

IMPORT_C void Cancel ( )

Cancels the current operation

Since
2.0

CommitChanges()

IMPORT_C TInt CommitChanges ( )

Saves the changes into a permanent storage.

Since
2.0

ConstructL(TUid, TUid, MSISpeechRecognitionUtilityObserver &)

void ConstructL ( TUid aClientUid,
TUid aPluginUid,
MSISpeechRecognitionUtilityObserver & aObserver
) [private]

Second phase constructor for this class.

Since
2.0

Parameters

TUid aClientUid Client UID for data ownership, other clients won't be able to modify the data registered to certain client
TUid aPluginUid UID of the plugin which will be used, KNullUid to search for suitable plugin
MSISpeechRecognitionUtilityObserver & aObserver Callback observer reference

CreateGrammar(TSIGrammarID &)

IMPORT_C TInt CreateGrammar ( TSIGrammarID & aGrammarID )

Creates a new grammar.

Since
2.0

Parameters

TSIGrammarID & aGrammarID reference where grammar ID is stored

CreateInstanceL()

IMPORT_C TAny * CreateInstanceL ( ) [static]

CreateInstanceSecondPhaseL(TUid, TUid, MSISpeechRecognitionUtilityObserver &)

IMPORT_C void CreateInstanceSecondPhaseL ( TUid aClientUid,
TUid aPluginUid,
MSISpeechRecognitionUtilityObserver & aObserver
)

Second phase of construction after CreateInstanceL call. Needed when dynamically loading nsssispeechrecognitionutility.dll Direct users of CSISpeechRecognitionUtility should not use this.

Since
3.1

Parameters

TUid aClientUid Client UID for data ownership, other clients won't be able to modify the data registered to certain client
TUid aPluginUid UID of the plugin which will be used, KNullUid to search for suitable plugin
MSISpeechRecognitionUtilityObserver & aObserver Callback observer reference

CreateLexicon(TSILexiconID &)

IMPORT_C TInt CreateLexicon ( TSILexiconID & aLexiconID )

Creates a new lexicon.

Since
2.0

Parameters

TSILexiconID & aLexiconID reference where lexicon ID is stored

CreateModelBank(TSIModelBankID &)

IMPORT_C TInt CreateModelBank ( TSIModelBankID & aModelBankID )

Creates a new model bank.

Since
2.0

Parameters

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

CreateRule(TSIGrammarID, TSIRuleID &)

IMPORT_C TInt CreateRule ( TSIGrammarID aGrammarID,
TSIRuleID & aRuleID
)

Creates a new rule.

Since
2.8

Parameters

TSIGrammarID aGrammarID grammar, where the new rule is to be added
TSIRuleID & aRuleID reference where rule ID is stored

DeactivateGrammar(TSIGrammarID)

IMPORT_C TInt DeactivateGrammar ( TSIGrammarID aGrammarID )

Deactivates a loaded grammar, so that it is not recognized.

Since
2.0

Parameters

TSIGrammarID aGrammarID grammar ID

EndRecSession()

IMPORT_C TInt EndRecSession ( )

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

Since
2.0

EndRecord()

IMPORT_C TInt EndRecord ( )

Stops the recording. The difference with Cancel is that if enough samples were recorded, a recognition result will be produced.

Since
2.8

GetAllClientGrammarIDs(RArray< TSIGrammarID > &)

IMPORT_C TInt GetAllClientGrammarIDs ( RArray < TSIGrammarID > & aGrammarIDs )

Returns all grammar Ids that belong to the current client.

Since
2.0

Parameters

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

GetAllClientLexiconIDs(RArray< TSILexiconID > &)

IMPORT_C TInt GetAllClientLexiconIDs ( RArray < TSILexiconID > & aLexiconIDs )

Returns all lexicon Ids that belong to the current client.

Since
2.0

Parameters

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

GetAllClientModelBankIDs(RArray< TSIModelBankID > &)

IMPORT_C TInt GetAllClientModelBankIDs ( RArray < TSIModelBankID > & aModelBankIDs )
Returns all model bank Ids that belong to the current client.
Since
2.0

Parameters

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

GetAllGrammarIDs(RArray< TSIGrammarID > &)

IMPORT_C TInt GetAllGrammarIDs ( RArray < TSIGrammarID > & aGrammarIDs )

Returns all grammar Ids that exist (for all clients).

Since
2.0

Parameters

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

GetAllLexiconIDs(RArray< TSILexiconID > &)

IMPORT_C TInt GetAllLexiconIDs ( RArray < TSILexiconID > & aLexiconIDs )

Returns all lexicon Ids that exist (for all clients).

Since
2.0

Parameters

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

GetAllModelBankIDs(RArray< TSIModelBankID > &)

IMPORT_C TInt GetAllModelBankIDs ( RArray < TSIModelBankID > & aModelBankIDs )

Returns all model bank Ids that exist (for all clients).

Since
2.0

Parameters

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

GetAllModelIDs(TSIModelBankID, RArray< TSIModelID > &)

IMPORT_C TInt GetAllModelIDs ( TSIModelBankID aModelBankID,
RArray < TSIModelID > & aModelIDs
)

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

Since
2.0

Parameters

TSIModelBankID aModelBankID model bank Id aModelIDs reference where model Ids are stored
RArray < TSIModelID > & aModelIDs

GetAllPronunciationIDs(TSILexiconID, RArray< TSIPronunciationID > &)

IMPORT_C TInt GetAllPronunciationIDs ( TSILexiconID aLexiconID,
RArray < TSIPronunciationID > & aPronunciationIDs
)

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

GetAllRuleIDs(TSIGrammarID, RArray< TSIRuleID > &)

IMPORT_C TInt GetAllRuleIDs ( TSIGrammarID aGrammarID,
RArray < TSIRuleID > & aRuleIDs
)

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

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

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.

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

GetModelCount(TSIModelBankID, TInt &)

IMPORT_C TInt GetModelCount ( TSIModelBankID aModelBankID,
TInt & aModelCount
)
Returns the number of models in the specified model bank.
Since
2.0

Parameters

TSIModelBankID aModelBankID model bank Id
TInt & aModelCount

GetRuleValidity(TSIGrammarID, TSIRuleID, TBool &)

IMPORT_C TInt GetRuleValidity ( TSIGrammarID aGrammarID,
TSIRuleID aRuleID,
TBool & aValid
)

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

HandleEvent(const TMMFEvent &)

void HandleEvent ( const TMMFEvent & aEvent )

Parameters

const TMMFEvent & aEvent event code indicating what asynchronous event occurred

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

IMPORT_C TInt LoadEngineParameters ( const RArray < TInt > & aParameterId,
const RArray < TInt > & aParameterValue
)

Uploads the specified parameters into the engine.

Since
2.0

Parameters

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

LoadGrammar(TSIGrammarID)

IMPORT_C TInt LoadGrammar ( TSIGrammarID aGrammarID )

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

Since
2.0

Parameters

TSIGrammarID aGrammarID grammar ID

LoadLexicon(TSILexiconID)

IMPORT_C TInt LoadLexicon ( TSILexiconID aLexiconID )

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

Since
2.0

Parameters

TSILexiconID aLexiconID lexicon ID

LoadModels(TSIModelBankID)

IMPORT_C TInt LoadModels ( TSIModelBankID aModelBankID )

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

Since
2.0

Parameters

TSIModelBankID aModelBankID

NewL(MSISpeechRecognitionUtilityObserver &, TUid)

IMPORT_C CSISpeechRecognitionUtility * NewL ( MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver,
TUid aClientUid
) [static]

Factory function for creating this class.

Since
2.0

Parameters

MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver reference to event observer class
TUid aClientUid client UID for data ownership

NewL(MSISpeechRecognitionUtilityObserver &, TUid, TNSSRecognitionMode)

IMPORT_C CSISpeechRecognitionUtility * NewL ( MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver,
TUid aClientUid,
TNSSRecognitionMode aPreferredMode
) [static]

Factory function for creating this class. Searches for a plugin, which supports the given recognition mode. If no such plugin is found, leaves.

Since
2.8

Parameters

MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver reference to the event observer class
TUid aClientUid client UID for data ownership
TNSSRecognitionMode aPreferredMode Recognition technology (speaker independent or dependent)

NewL(MSISpeechRecognitionUtilityObserver &, TUid, TUid)

IMPORT_C CSISpeechRecognitionUtility * NewL ( MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver,
TUid aClientUid,
TUid aMmfPluginUid
) [static]

Factory function for creating this class. Loads the plugin with the given ID.

Since
2.8

Parameters

MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver reference to the event observer class
TUid aClientUid client UID for data ownership
TUid aMmfPluginUid UID of the speech recognition plugin

NewLC(MSISpeechRecognitionUtilityObserver &, TUid)

IMPORT_C CSISpeechRecognitionUtility * NewLC ( MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver,
TUid aClientUid
) [static]

Factory function for creating this class. Leaves a pointer on the cleanup

Since
2.0

Parameters

MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserver reference to event observer class
TUid aClientUid client UID for data ownership

PreStartSampling()

IMPORT_C TInt PreStartSampling ( )

Pre-starts samping before Record call.

Since
3.2

Recognize(CSIClientResultSet &)

IMPORT_C TInt Recognize ( CSIClientResultSet & aResultSet )

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

Since
2.8

Parameters

CSIClientResultSet & aResultSet reference where the recognition result is set

Record(TTimeIntervalMicroSeconds32)

IMPORT_C TInt Record ( TTimeIntervalMicroSeconds32 aRecordTime )

Records uder utterance for training and recognition.

Since
2.0

Parameters

TTimeIntervalMicroSeconds32 aRecordTime recording time in microseconds

RemoveGrammar(TSIGrammarID)

IMPORT_C TInt RemoveGrammar ( TSIGrammarID aGrammarID )

Removes the specified grammar from the permanent storage. Removing a grammar will remove all rules within the grammar.

Since
2.0

Parameters

TSIGrammarID aGrammarID grammar Id

RemoveLexicon(TSILexiconID)

IMPORT_C TInt RemoveLexicon ( TSILexiconID aLexiconID )

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

RemoveModel(TSIModelBankID, TSIModelID)

IMPORT_C TInt RemoveModel ( TSIModelBankID aModelBankID,
TSIModelID aModelID
)

Removes the specified model from the specified model bank permanently.

Since
2.0

Parameters

TSIModelBankID aModelBankID model bank Id
TSIModelID aModelID model Id

RemoveModelBank(TSIModelBankID)

IMPORT_C TInt RemoveModelBank ( TSIModelBankID aModelBankID )
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

RemovePronunciation(TSILexiconID, TSIPronunciationID)

IMPORT_C TInt RemovePronunciation ( TSILexiconID aLexiconID,
TSIPronunciationID aPronunciationID
)

Removes the specified pronunciation from the specified lexicon permanently.

Since
2.0

Parameters

TSILexiconID aLexiconID lexicon Id
TSIPronunciationID aPronunciationID pronunciation Id

RemoveRule(TSIGrammarID, TSIRuleID)

IMPORT_C TInt RemoveRule ( TSIGrammarID aGrammarID,
TSIRuleID aRuleID
)

Removes the specified rule from the specified grammar permanently.

Since
2.0

Parameters

TSIGrammarID aGrammarID grammar Id
TSIRuleID aRuleID rule Id

RemoveRules(TSIGrammarID, RArray< TSIRuleID > &)

IMPORT_C TInt RemoveRules ( TSIGrammarID aGrammarID,
RArray < TSIRuleID > & aRuleIDs
)

Removes multiple rules from the specified grammar permanently.

Since
2.0

Parameters

TSIGrammarID aGrammarID grammar Id
RArray < TSIRuleID > & aRuleIDs

SetAudioPriority(TInt, TInt, TInt, TInt)

IMPORT_C TInt SetAudioPriority ( TInt aPriority,
TInt aTrainPreference,
TInt aPlaybackPreference,
TInt aRecognitionPreference
)

Set the audio priority and preference for train, playback and recognition

Since
2.0

Parameters

TInt aPriority priority for voice recognition
TInt aTrainPreference preference for training
TInt aPlaybackPreference preference for playback
TInt aRecognitionPreference preference for recognition

SetEventHandler(MSISpeechRecognitionUtilityObserver *)

IMPORT_C void SetEventHandler ( MSISpeechRecognitionUtilityObserver * aSpeechRecognitionUtilityObserver )

Set the event handler for asynchronous events

Since
2.0

Parameters

MSISpeechRecognitionUtilityObserver * aSpeechRecognitionUtilityObserver pointer to observer

StartRecSession(TNSSRecognitionMode)

IMPORT_C TInt StartRecSession ( TNSSRecognitionMode aMode )

Starts a new recognition session.

Since
2.0

Parameters

TNSSRecognitionMode aMode recognition mode

UnloadGrammar(TSIGrammarID)

IMPORT_C TInt UnloadGrammar ( TSIGrammarID aGrammarID )

Unloads the specified grammar from the list of grammars in temporary memory, previously loaded with LoadGrammarL. The grammar in the permanent storage remains intact.

Since
2.8

Parameters

TSIGrammarID aGrammarID grammar Id

UnloadRule(TSIGrammarID, TSIRuleID)

IMPORT_C TInt UnloadRule ( TSIGrammarID aGrammarID,
TSIRuleID aRuleID
)

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

TInt iAudioPriority

TInt iAudioPriority [private]

TUid iClientUid

TUid iClientUid [private]

CMMFControllerEventMonitor * iControllerEventMonitor

CMMFControllerEventMonitor * iControllerEventMonitor [private]

TSIGrammarID iGrammarID

TSIGrammarID iGrammarID [private]

RArray< TSIGrammarID > * iGrammarIDs

RArray < TSIGrammarID > * iGrammarIDs [private]

TBool iInternalCommand

TBool iInternalCommand [private]

TSILexiconID iLexiconID

TSILexiconID iLexiconID [private]

RArray< TSILexiconID > * iLexiconIDs

RArray < TSILexiconID > * iLexiconIDs [private]

RMMFController iMMFController

RMMFController iMMFController [private]

TSIModelBankID iModelBankID

TSIModelBankID iModelBankID [private]

RArray< TSIModelBankID > * iModelBankIDs

RArray < TSIModelBankID > * iModelBankIDs [private]

TInt iModelCount

TInt iModelCount [private]

RArray< TSIModelID > * iModelIDs

RArray < TSIModelID > * iModelIDs [private]

TInt iPlaybackPreference

TInt iPlaybackPreference [private]

TInt iPronunciationCount

TInt iPronunciationCount [private]

RArray< TSIPronunciationID > * iPronunciationIDs

RArray < TSIPronunciationID > * iPronunciationIDs [private]

TInt iRecognitionPreference

TInt iRecognitionPreference [private]

TAny * iReservedPtr_1

TAny * iReservedPtr_1 [private]

TAny * iReservedPtr_2

TAny * iReservedPtr_2 [private]

CSDClientResultSet * iResultSet

CSDClientResultSet * iResultSet [private]

TInt iRuleCount

TInt iRuleCount [private]

RArray< TSIRuleID > * iRuleIDs

RArray < TSIRuleID > * iRuleIDs [private]

CSIClientResultSet * iSIResultSet

CSIClientResultSet * iSIResultSet [private]

MSISpeechRecognitionUtilityObserver * iSpeechRecognitionUtilityObserver

MSISpeechRecognitionUtilityObserver * iSpeechRecognitionUtilityObserver [private]

RSISpeechRecognitionCustomCommands iSrCustomCommands

RSISpeechRecognitionCustomCommands iSrCustomCommands [private]

TInt iTrainPreference

TInt iTrainPreference [private]