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 TIntActivateGrammar(TSIGrammarID)
IMPORT_C TIntAdapt(const CSIClientResultSet &, TInt)
IMPORT_C TIntAddPronunciation(TSILexiconID, const TDesC &, TLanguage, TSIPronunciationID &)
IMPORT_C TIntAddRule(TSIGrammarID, TSILexiconID, TSIPronunciationID, TSIRuleID &)
IMPORT_C TIntAddRuleVariant(TSIGrammarID, TSILexiconID, RArray< TSIPronunciationID > &, TSIRuleID, TSIRuleVariantID &)
IMPORT_C TIntAddVoiceTag(MDesCArray &, const RArray< TLanguage > &, TSILexiconID, TSIGrammarID, TSIRuleID &)
IMPORT_C TIntAddVoiceTag(MDesCArray &, const RArray< RLanguageArray > &, TSILexiconID, TSIGrammarID, TSIRuleID &)
IMPORT_C TIntAddVoiceTags(const RPointerArray< MDesCArray > &, const RArray< TLanguage > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &)
IMPORT_C TIntAddVoiceTags(const RPointerArray< MDesCArray > &, const RArray< RLanguageArray > &, TSILexiconID, TSIGrammarID, RArray< TSIRuleID > &)
IMPORT_C voidCancel()
IMPORT_C TIntCommitChanges()
IMPORT_C TIntCreateGrammar(TSIGrammarID &)
IMPORT_C TAny *CreateInstanceL()
IMPORT_C voidCreateInstanceSecondPhaseL(TUid, TUid, MSISpeechRecognitionUtilityObserver &)
IMPORT_C TIntCreateLexicon(TSILexiconID &)
IMPORT_C TIntCreateModelBank(TSIModelBankID &)
IMPORT_C TIntCreateRule(TSIGrammarID, TSIRuleID &)
IMPORT_C TIntDeactivateGrammar(TSIGrammarID)
IMPORT_C TIntEndRecSession()
IMPORT_C TIntEndRecord()
IMPORT_C TIntGetAllClientGrammarIDs(RArray< TSIGrammarID > &)
IMPORT_C TIntGetAllClientLexiconIDs(RArray< TSILexiconID > &)
IMPORT_C TIntGetAllClientModelBankIDs(RArray< TSIModelBankID > &)
IMPORT_C TIntGetAllGrammarIDs(RArray< TSIGrammarID > &)
IMPORT_C TIntGetAllLexiconIDs(RArray< TSILexiconID > &)
IMPORT_C TIntGetAllModelBankIDs(RArray< TSIModelBankID > &)
IMPORT_C TIntGetAllModelIDs(TSIModelBankID, RArray< TSIModelID > &)
IMPORT_C TIntGetAllPronunciationIDs(TSILexiconID, RArray< TSIPronunciationID > &)
IMPORT_C TIntGetAllRuleIDs(TSIGrammarID, RArray< TSIRuleID > &)
IMPORT_C TIntGetEngineProperties(const RArray< TInt > &, RArray< TInt > &)
IMPORT_C TIntGetModelCount(TSIModelBankID, TInt &)
IMPORT_C TIntGetRuleValidity(TSIGrammarID, TSIRuleID, TBool &)
voidHandleEvent(const TMMFEvent &)
IMPORT_C TIntLoadEngineParameters(const RArray< TInt > &, const RArray< TInt > &)
IMPORT_C TIntLoadGrammar(TSIGrammarID)
IMPORT_C TIntLoadLexicon(TSILexiconID)
IMPORT_C TIntLoadModels(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 TIntPreStartSampling()
IMPORT_C TIntRecognize(CSIClientResultSet &)
IMPORT_C TIntRecord(TTimeIntervalMicroSeconds32)
IMPORT_C TIntRemoveGrammar(TSIGrammarID)
IMPORT_C TIntRemoveLexicon(TSILexiconID)
IMPORT_C TIntRemoveModel(TSIModelBankID, TSIModelID)
IMPORT_C TIntRemoveModelBank(TSIModelBankID)
IMPORT_C TIntRemovePronunciation(TSILexiconID, TSIPronunciationID)
IMPORT_C TIntRemoveRule(TSIGrammarID, TSIRuleID)
IMPORT_C TIntRemoveRules(TSIGrammarID, RArray< TSIRuleID > &)
IMPORT_C TIntSetAudioPriority(TInt, TInt, TInt, TInt)
IMPORT_C voidSetEventHandler(MSISpeechRecognitionUtilityObserver *)
IMPORT_C TIntStartRecSession(TNSSRecognitionMode)
IMPORT_C TIntUnloadGrammar(TSIGrammarID)
IMPORT_C TIntUnloadRule(TSIGrammarID, TSIRuleID)
Private Member Functions
CSISpeechRecognitionUtility(MSISpeechRecognitionUtilityObserver &)
CSISpeechRecognitionUtility()
voidConstructL(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 & aSpeechRecognitionUtilityObserverreference 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 TIntActivateGrammar(TSIGrammarIDaGrammarID)

Reactivates a previously deactivated grammar.

Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar ID

Adapt(const CSIClientResultSet &, TInt)

IMPORT_C TIntAdapt(const CSIClientResultSet &aResultSet,
TIntaCorrect
)

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

Since
2.8

Parameters

const CSIClientResultSet & aResultSetRecognition result N-Best
TInt aCorrectIndex to N-Best pointing the correct result.

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

IMPORT_C TIntAddPronunciation(TSILexiconIDaLexiconID,
const TDesC &aTextForTraining,
TLanguageaLanguage,
TSIPronunciationID &aPronunciationID
)

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

Since
2.8

Parameters

TSILexiconID aLexiconIDlexicon 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 TIntAddRule(TSIGrammarIDaGrammarID,
TSILexiconIDaLexiconID,
TSIPronunciationIDaPronunciationID,
TSIRuleID &aRuleID
)

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

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

IMPORT_C TIntAddRuleVariant(TSIGrammarIDaGrammarID,
TSILexiconIDaLexiconID,
RArray< TSIPronunciationID > &aPronunciationIDs,
TSIRuleIDaRuleID,
TSIRuleVariantID &aRuleVariantID
)

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

Since
2.8

Parameters

TSIGrammarID aGrammarIDgrammar Id, where the new rule is added to
TSILexiconID aLexiconID
RArray< TSIPronunciationID > & aPronunciationIDsthe phrase is the concatenation of these pronunciation IDs
TSIRuleID aRuleIDthe rule Id, which will contain this variant
TSIRuleVariantID & aRuleVariantIDreference where a new rule variant Id is assigned to

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

IMPORT_C TIntAddVoiceTag(MDesCArray &aTextArray,
const RArray< TLanguage > &aLanguageArray,
TSILexiconIDaLexiconID,
TSIGrammarIDaGrammarID,
TSIRuleID &aRuleID
)

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

Since
2.8

Parameters

MDesCArray & aTextArraythe text to be trained, divided in to words. The phrase is the concatenation of these words.
const RArray< TLanguage > & aLanguageArraypronunciations will be generated for these languages
TSILexiconID aLexiconIDlexicon, where to add pronunciations
TSIGrammarID aGrammarIDgrammar, where to add rules
TSIRuleID & aRuleIDthe ID of the rule will be placed on this variable.

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

IMPORT_C TIntAddVoiceTag(MDesCArray &aTextArray,
const RArray< RLanguageArray > &aLanguageArray,
TSILexiconIDaLexiconID,
TSIGrammarIDaGrammarID,
TSIRuleID &aRuleID
)

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

Since
3.1

Parameters

MDesCArray & aTextArrayThe text to be trained, divided in to words. The phrase is the concatenation of these words.
const RArray< RLanguageArray > & aLanguageArrayPronunciations will be generated for these languages
TSILexiconID aLexiconIDLexicon, where to add pronunciations
TSIGrammarID aGrammarIDGrammar, where to add rules
TSIRuleID & aRuleIDThe ID of the rule will be placed on this variable.

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

IMPORT_C TIntAddVoiceTags(const RPointerArray< MDesCArray > &aTextArrayArray,
const RArray< TLanguage > &aLanguageArray,
TSILexiconIDaLexiconID,
TSIGrammarIDaGrammarID,
RArray< TSIRuleID > &aRuleIDArray
)

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

Since
2.8

Parameters

const RPointerArray< MDesCArray > & aTextArrayArrayArray of text arrays. The phrase k is the concatenation of texts in array k.
const RArray< TLanguage > & aLanguageArraypronunciations will be generated for these languages
TSILexiconID aLexiconIDlexicon, where to add pronunciations
TSIGrammarID aGrammarIDgrammar, where to add rules
RArray< TSIRuleID > & aRuleIDArray

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

IMPORT_C TIntAddVoiceTags(const RPointerArray< MDesCArray > &aTextArrayArray,
const RArray< RLanguageArray > &aLanguageArray,
TSILexiconIDaLexiconID,
TSIGrammarIDaGrammarID,
RArray< TSIRuleID > &aRuleIDArray
)

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

Since
3.1

Parameters

const RPointerArray< MDesCArray > & aTextArrayArrayArray of text arrays. The phrase k is the concatenation of texts in array k.
const RArray< RLanguageArray > & aLanguageArraypronunciations will be generated for these languages
TSILexiconID aLexiconIDlexicon, where to add pronunciations
TSIGrammarID aGrammarIDgrammar, where to add rules
RArray< TSIRuleID > & aRuleIDArray

Cancel()

IMPORT_C voidCancel()

Cancels the current operation

Since
2.0

CommitChanges()

IMPORT_C TIntCommitChanges()

Saves the changes into a permanent storage.

Since
2.0

ConstructL(TUid, TUid, MSISpeechRecognitionUtilityObserver &)

voidConstructL(TUidaClientUid,
TUidaPluginUid,
MSISpeechRecognitionUtilityObserver &aObserver
)[private]

Second phase constructor for this class.

Since
2.0

Parameters

TUid aClientUidClient UID for data ownership, other clients won't be able to modify the data registered to certain client
TUid aPluginUidUID of the plugin which will be used, KNullUid to search for suitable plugin
MSISpeechRecognitionUtilityObserver & aObserverCallback observer reference

CreateGrammar(TSIGrammarID &)

IMPORT_C TIntCreateGrammar(TSIGrammarID &aGrammarID)

Creates a new grammar.

Since
2.0

Parameters

TSIGrammarID & aGrammarIDreference where grammar ID is stored

CreateInstanceL()

IMPORT_C TAny *CreateInstanceL()[static]

CreateInstanceSecondPhaseL(TUid, TUid, MSISpeechRecognitionUtilityObserver &)

IMPORT_C voidCreateInstanceSecondPhaseL(TUidaClientUid,
TUidaPluginUid,
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 aClientUidClient UID for data ownership, other clients won't be able to modify the data registered to certain client
TUid aPluginUidUID of the plugin which will be used, KNullUid to search for suitable plugin
MSISpeechRecognitionUtilityObserver & aObserverCallback observer reference

CreateLexicon(TSILexiconID &)

IMPORT_C TIntCreateLexicon(TSILexiconID &aLexiconID)

Creates a new lexicon.

Since
2.0

Parameters

TSILexiconID & aLexiconIDreference where lexicon ID is stored

CreateModelBank(TSIModelBankID &)

IMPORT_C TIntCreateModelBank(TSIModelBankID &aModelBankID)

Creates a new model bank.

Since
2.0

Parameters

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

CreateRule(TSIGrammarID, TSIRuleID &)

IMPORT_C TIntCreateRule(TSIGrammarIDaGrammarID,
TSIRuleID &aRuleID
)

Creates a new rule.

Since
2.8

Parameters

TSIGrammarID aGrammarIDgrammar, where the new rule is to be added
TSIRuleID & aRuleIDreference where rule ID is stored

DeactivateGrammar(TSIGrammarID)

IMPORT_C TIntDeactivateGrammar(TSIGrammarIDaGrammarID)

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

Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar ID

EndRecSession()

IMPORT_C TIntEndRecSession()

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

Since
2.0

EndRecord()

IMPORT_C TIntEndRecord()

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 TIntGetAllClientGrammarIDs(RArray< TSIGrammarID > &aGrammarIDs)

Returns all grammar Ids that belong to the current client.

Since
2.0

Parameters

RArray< TSIGrammarID > & aGrammarIDsreference where grammar Ids are stored

GetAllClientLexiconIDs(RArray< TSILexiconID > &)

IMPORT_C TIntGetAllClientLexiconIDs(RArray< TSILexiconID > &aLexiconIDs)

Returns all lexicon Ids that belong to the current client.

Since
2.0

Parameters

RArray< TSILexiconID > & aLexiconIDsreference where lexicon Ids are stored

GetAllClientModelBankIDs(RArray< TSIModelBankID > &)

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

Parameters

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

GetAllGrammarIDs(RArray< TSIGrammarID > &)

IMPORT_C TIntGetAllGrammarIDs(RArray< TSIGrammarID > &aGrammarIDs)

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

Since
2.0

Parameters

RArray< TSIGrammarID > & aGrammarIDsreference where grammar Ids are stored

GetAllLexiconIDs(RArray< TSILexiconID > &)

IMPORT_C TIntGetAllLexiconIDs(RArray< TSILexiconID > &aLexiconIDs)

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

Since
2.0

Parameters

RArray< TSILexiconID > & aLexiconIDsreference where lexicon Ids are stored

GetAllModelBankIDs(RArray< TSIModelBankID > &)

IMPORT_C TIntGetAllModelBankIDs(RArray< TSIModelBankID > &aModelBankIDs)

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

Since
2.0

Parameters

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

GetAllModelIDs(TSIModelBankID, RArray< TSIModelID > &)

IMPORT_C TIntGetAllModelIDs(TSIModelBankIDaModelBankID,
RArray< TSIModelID > &aModelIDs
)

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

Since
2.0

Parameters

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

GetAllPronunciationIDs(TSILexiconID, RArray< TSIPronunciationID > &)

IMPORT_C TIntGetAllPronunciationIDs(TSILexiconIDaLexiconID,
RArray< TSIPronunciationID > &aPronunciationIDs
)

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

GetAllRuleIDs(TSIGrammarID, RArray< TSIRuleID > &)

IMPORT_C TIntGetAllRuleIDs(TSIGrammarIDaGrammarID,
RArray< TSIRuleID > &aRuleIDs
)

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

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

IMPORT_C TIntGetEngineProperties(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 > & aPropertyIdconstant reference to array of engine property Ids
RArray< TInt > & aPropertyValuereference to array of engine property values

GetModelCount(TSIModelBankID, TInt &)

IMPORT_C TIntGetModelCount(TSIModelBankIDaModelBankID,
TInt &aModelCount
)
Returns the number of models in the specified model bank.
Since
2.0

Parameters

TSIModelBankID aModelBankIDmodel bank Id
TInt & aModelCount

GetRuleValidity(TSIGrammarID, TSIRuleID, TBool &)

IMPORT_C TIntGetRuleValidity(TSIGrammarIDaGrammarID,
TSIRuleIDaRuleID,
TBool &aValid
)

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

HandleEvent(const TMMFEvent &)

voidHandleEvent(const TMMFEvent &aEvent)

Parameters

const TMMFEvent & aEventevent code indicating what asynchronous event occurred

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

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

Uploads the specified parameters into the engine.

Since
2.0

Parameters

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

LoadGrammar(TSIGrammarID)

IMPORT_C TIntLoadGrammar(TSIGrammarIDaGrammarID)

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

Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar ID

LoadLexicon(TSILexiconID)

IMPORT_C TIntLoadLexicon(TSILexiconIDaLexiconID)

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

Since
2.0

Parameters

TSILexiconID aLexiconIDlexicon ID

LoadModels(TSIModelBankID)

IMPORT_C TIntLoadModels(TSIModelBankIDaModelBankID)

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,
TUidaClientUid
)[static]

Factory function for creating this class.

Since
2.0

Parameters

MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserverreference to event observer class
TUid aClientUidclient UID for data ownership

NewL(MSISpeechRecognitionUtilityObserver &, TUid, TNSSRecognitionMode)

IMPORT_C CSISpeechRecognitionUtility *NewL(MSISpeechRecognitionUtilityObserver &aSpeechRecognitionUtilityObserver,
TUidaClientUid,
TNSSRecognitionModeaPreferredMode
)[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 & aSpeechRecognitionUtilityObserverreference to the event observer class
TUid aClientUidclient UID for data ownership
TNSSRecognitionMode aPreferredModeRecognition technology (speaker independent or dependent)

NewL(MSISpeechRecognitionUtilityObserver &, TUid, TUid)

IMPORT_C CSISpeechRecognitionUtility *NewL(MSISpeechRecognitionUtilityObserver &aSpeechRecognitionUtilityObserver,
TUidaClientUid,
TUidaMmfPluginUid
)[static]

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

Since
2.8

Parameters

MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserverreference to the event observer class
TUid aClientUidclient UID for data ownership
TUid aMmfPluginUidUID of the speech recognition plugin

NewLC(MSISpeechRecognitionUtilityObserver &, TUid)

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

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

Since
2.0

Parameters

MSISpeechRecognitionUtilityObserver & aSpeechRecognitionUtilityObserverreference to event observer class
TUid aClientUidclient UID for data ownership

PreStartSampling()

IMPORT_C TIntPreStartSampling()

Pre-starts samping before Record call.

Since
3.2

Recognize(CSIClientResultSet &)

IMPORT_C TIntRecognize(CSIClientResultSet &aResultSet)

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

Since
2.8

Parameters

CSIClientResultSet & aResultSetreference where the recognition result is set

Record(TTimeIntervalMicroSeconds32)

IMPORT_C TIntRecord(TTimeIntervalMicroSeconds32aRecordTime)

Records uder utterance for training and recognition.

Since
2.0

Parameters

TTimeIntervalMicroSeconds32 aRecordTimerecording time in microseconds

RemoveGrammar(TSIGrammarID)

IMPORT_C TIntRemoveGrammar(TSIGrammarIDaGrammarID)

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

Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar Id

RemoveLexicon(TSILexiconID)

IMPORT_C TIntRemoveLexicon(TSILexiconIDaLexiconID)

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

RemoveModel(TSIModelBankID, TSIModelID)

IMPORT_C TIntRemoveModel(TSIModelBankIDaModelBankID,
TSIModelIDaModelID
)

Removes the specified model from the specified model bank permanently.

Since
2.0

Parameters

TSIModelBankID aModelBankIDmodel bank Id
TSIModelID aModelIDmodel Id

RemoveModelBank(TSIModelBankID)

IMPORT_C TIntRemoveModelBank(TSIModelBankIDaModelBankID)
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

RemovePronunciation(TSILexiconID, TSIPronunciationID)

IMPORT_C TIntRemovePronunciation(TSILexiconIDaLexiconID,
TSIPronunciationIDaPronunciationID
)

Removes the specified pronunciation from the specified lexicon permanently.

Since
2.0

Parameters

TSILexiconID aLexiconIDlexicon Id
TSIPronunciationID aPronunciationIDpronunciation Id

RemoveRule(TSIGrammarID, TSIRuleID)

IMPORT_C TIntRemoveRule(TSIGrammarIDaGrammarID,
TSIRuleIDaRuleID
)

Removes the specified rule from the specified grammar permanently.

Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar Id
TSIRuleID aRuleIDrule Id

RemoveRules(TSIGrammarID, RArray< TSIRuleID > &)

IMPORT_C TIntRemoveRules(TSIGrammarIDaGrammarID,
RArray< TSIRuleID > &aRuleIDs
)

Removes multiple rules from the specified grammar permanently.

Since
2.0

Parameters

TSIGrammarID aGrammarIDgrammar Id
RArray< TSIRuleID > & aRuleIDs

SetAudioPriority(TInt, TInt, TInt, TInt)

IMPORT_C TIntSetAudioPriority(TIntaPriority,
TIntaTrainPreference,
TIntaPlaybackPreference,
TIntaRecognitionPreference
)

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

Since
2.0

Parameters

TInt aPrioritypriority for voice recognition
TInt aTrainPreferencepreference for training
TInt aPlaybackPreferencepreference for playback
TInt aRecognitionPreferencepreference for recognition

SetEventHandler(MSISpeechRecognitionUtilityObserver *)

IMPORT_C voidSetEventHandler(MSISpeechRecognitionUtilityObserver *aSpeechRecognitionUtilityObserver)

Set the event handler for asynchronous events

Since
2.0

Parameters

MSISpeechRecognitionUtilityObserver * aSpeechRecognitionUtilityObserverpointer to observer

StartRecSession(TNSSRecognitionMode)

IMPORT_C TIntStartRecSession(TNSSRecognitionModeaMode)

Starts a new recognition session.

Since
2.0

Parameters

TNSSRecognitionMode aModerecognition mode

UnloadGrammar(TSIGrammarID)

IMPORT_C TIntUnloadGrammar(TSIGrammarIDaGrammarID)

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 aGrammarIDgrammar Id

UnloadRule(TSIGrammarID, TSIRuleID)

IMPORT_C TIntUnloadRule(TSIGrammarIDaGrammarID,
TSIRuleIDaRuleID
)

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

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]