Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: speechrecognitioncustomcommandimplementor.h

This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.

Class MSpeechRecognitionCustomCommandImplementor

class MSpeechRecognitionCustomCommandImplementor;

Description

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

Members

Defined in MSpeechRecognitionCustomCommandImplementor:
MSrAddPronunciationL(), MSrAddRuleL(), MSrCancel(), MSrCommitChangesL(), MSrCreateGrammarL(), MSrCreateLexiconL(), MSrCreateModelBankL(), MSrEndRecSessionL(), MSrGetAllClientGrammarIDsL(), MSrGetAllClientLexiconIDsL(), MSrGetAllClientModelBankIDsL(), MSrGetAllGrammarIDsL(), MSrGetAllLexiconIDsL(), MSrGetAllModelBankIDsL(), MSrGetAllModelIDsL(), MSrGetAllPronunciationIDsL(), MSrGetAllRuleIDsL(), MSrGetAvailableStorageL(), MSrGetEnginePropertiesL(), MSrGetModelCountL(), MSrGetRuleValidityL(), MSrGetUtteranceDurationL(), MSrLoadEngineParametersL(), MSrLoadGrammarL(), MSrLoadLexiconL(), MSrLoadModelsL(), MSrPlayUtteranceL(), MSrRecognizeL(), MSrRecordL(), MSrRemoveGrammarL(), MSrRemoveLexiconL(), MSrRemoveModelBankL(), MSrRemoveModelL(), MSrRemovePronunciationL(), MSrRemoveRuleL(), MSrSetClientUid(), MSrStartRecSessionL(), MSrTrainL(), MSrUnloadRuleL()


Member functions


MSrAddPronunciationL()

virtual void MSrAddPronunciationL(TLexiconID aLexiconID, TModelBankID aModelBankID, TModelID aModelID, TPronunciationID &aPronunciationID)=0;

Description

Adds a new pronunciation for the given model into the specified lexicon.

Parameters

TLexiconID aLexiconID

The lexicon ID to where the new pronunciation is added.

TModelBankID aModelBankID

The model bank ID.

TModelID aModelID

The model ID.

TPronunciationID &aPronunciationID

A reference to where a new pronunciation ID is assigned.


MSrAddRuleL()

virtual void MSrAddRuleL(TGrammarID aGrammarID, TLexiconID aLexiconID, TPronunciationID aPronunciationID, TRuleID &aRuleID)=0;

Description

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

Parameters

TGrammarID aGrammarID

The grammar ID, where the new rule is added to

TLexiconID aLexiconID

The lexicon ID.

TPronunciationID aPronunciationID

The pronunciation ID.

TRuleID &aRuleID

A reference where a new rule ID is assigned to.


MSrCancel()

virtual void MSrCancel()=0;

Description

Cancels the current operation.


MSrCommitChangesL()

virtual void MSrCommitChangesL()=0;

Description

Commit uncommited changes to the database.


MSrCreateGrammarL()

virtual void MSrCreateGrammarL(TGrammarID &aGrammarID)=0;

Description

Creates a new grammar.

Parameters

TGrammarID &aGrammarID

A reference where the grammar ID is stored.


MSrCreateLexiconL()

virtual void MSrCreateLexiconL(TLexiconID &aLexiconID)=0;

Description

Creates a new lexicon.

Parameters

TLexiconID &aLexiconID

A reference where the lexicon ID is stored.


MSrCreateModelBankL()

virtual void MSrCreateModelBankL(TModelBankID &aModelBankID)=0;

Description

Creates a new model bank.

Parameters

TModelBankID &aModelBankID

A reference to where a new model bank ID is assigned.


MSrEndRecSessionL()

virtual void MSrEndRecSessionL()=0;

Description

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


MSrGetAllClientGrammarIDsL()

virtual void MSrGetAllClientGrammarIDsL(RArray< TGrammarID > &aGrammarIDs)=0;

Description

Returns all grammar IDs that are owned by the client.

Parameters

RArray< TGrammarID > &aGrammarIDs

A reference where grammar IDs are stored.


MSrGetAllClientLexiconIDsL()

virtual void MSrGetAllClientLexiconIDsL(RArray< TLexiconID > &aLexiconIDs)=0;

Description

Returns all lexicon IDs that are owned by the client.

Parameters

RArray< TLexiconID > &aLexiconIDs

A reference where the lexicon IDs are stored.


MSrGetAllClientModelBankIDsL()

virtual void MSrGetAllClientModelBankIDsL(RArray< TModelBankID > &aModelBankIDs)=0;

Description

Returns all modelbank IDs that are owned by the client.

Parameters

RArray< TModelBankID > &aModelBankIDs

A reference where model bank IDs are stored.


MSrGetAllGrammarIDsL()

virtual void MSrGetAllGrammarIDsL(RArray< TGrammarID > &aGrammarIDs)=0;

Description

Returns all grammar IDs.

Parameters

RArray< TGrammarID > &aGrammarIDs

A reference where grammar IDs are stored.


MSrGetAllLexiconIDsL()

virtual void MSrGetAllLexiconIDsL(RArray< TLexiconID > &aLexiconIDs)=0;

Description

Returns all lexicon IDs.

Parameters

RArray< TLexiconID > &aLexiconIDs

A reference where lexicon IDs are stored.


MSrGetAllModelBankIDsL()

virtual void MSrGetAllModelBankIDsL(RArray< TModelBankID > &aModelBankIDs)=0;

Description

Returns all modelbank IDs.

Parameters

RArray< TModelBankID > &aModelBankIDs

A reference where the model bank IDs are stored.


MSrGetAllModelIDsL()

virtual void MSrGetAllModelIDsL(TModelBankID aModelBankID, RArray< TModelID > &aModelIDs)=0;

Description

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

Parameters

TModelBankID aModelBankID

The model bank ID.

RArray< TModelID > &aModelIDs

A reference where model IDs are stored.


MSrGetAllPronunciationIDsL()

virtual void MSrGetAllPronunciationIDsL(TLexiconID aLexiconID, RArray< TPronunciationID > &aPronunciationIDs)=0;

Description

Returns all pronunciation IDs that exist in the specified lexicon.

Parameters

TLexiconID aLexiconID

The lexicon ID.

RArray< TPronunciationID > &aPronunciationIDs

A reference where pronunciation IDs are stored.


MSrGetAllRuleIDsL()

virtual void MSrGetAllRuleIDsL(TGrammarID aGrammarID, RArray< TRuleID > &aRuleIDs)=0;

Description

Returns all rule IDs that exist in the specified grammar.

Parameters

TGrammarID aGrammarID

The grammar ID.

RArray< TRuleID > &aRuleIDs

A reference where rule IDs are stored.


MSrGetAvailableStorageL()

virtual void MSrGetAvailableStorageL(TInt &aCount)=0;

Description

Returns the number of models available for training system wide, based on available disk space.

Parameters

TInt &aCount

A reference where the number of available models is set.


MSrGetEnginePropertiesL()

virtual void MSrGetEnginePropertiesL(const RArray< TInt > &aPropertyId, RArray< TInt > &aPropertyValue)=0;

Description

Returns the engine properties specified by the engine property ID array.

On return aPropertyValue contains an array of engine properties.

Parameters

const RArray< TInt > &aPropertyId

A constant reference to an array of engine property IDs.

RArray< TInt > &aPropertyValue

A reference to an array of engine property values.


MSrGetModelCountL()

virtual void MSrGetModelCountL(TModelBankID aModelBankID, TInt &aCount)=0;

Description

Returns the number of models in the specified model bank.

Parameters

TModelBankID aModelBankID

The model bank ID.

TInt &aCount

A reference where the number of models is set.


MSrGetRuleValidityL()

virtual void MSrGetRuleValidityL(TGrammarID aGrammarID, TRuleID aRuleID, TBool &aValid)=0;

Description

Checks if the rule is valid or not.

Parameters

TGrammarID aGrammarID

The grammar ID.

TRuleID aRuleID

The rule ID.

TBool &aValid

A reference where the validity of the rule is set.


MSrGetUtteranceDurationL()

virtual void MSrGetUtteranceDurationL(TModelBankID aModelBankID, TModelID aModelID, TTimeIntervalMicroSeconds32 &aDuration)=0;

Description

Returns the duration of the utterance for the specified model.

Parameters

TModelBankID aModelBankID

The model bank ID.

TModelID aModelID

The model ID.

TTimeIntervalMicroSeconds32 &aDuration

A reference where the duration of utterance is set.


MSrLoadGrammarL()

virtual void MSrLoadGrammarL(TGrammarID aGrammarID)=0;

Description

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

Parameters

TGrammarID aGrammarID

The grammar ID.


MSrLoadLexiconL()

virtual void MSrLoadLexiconL(TLexiconID aLexiconID)=0;

Description

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

Parameters

TLexiconID aLexiconID

The lexicon ID.


MSrLoadModelsL()

virtual void MSrLoadModelsL(TModelBankID aModelBankID)=0;

Description

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

Parameters

TModelBankID aModelBankID

The model bank ID.


MSrPlayUtteranceL()

virtual void MSrPlayUtteranceL(TModelBankID aModelBankID, TModelID aModelID)=0;

Description

Plays the previously trained utterance.

Parameters

TModelBankID aModelBankID

The model bank ID.

TModelID aModelID

The model ID, whose utterance is played.


MSrRecognizeL()

virtual void MSrRecognizeL(CSDClientResultSet &aResultSet)=0;

Description

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

Parameters

CSDClientResultSet &aResultSet

A reference where the recognition result is set.


MSrRecordL()

virtual void MSrRecordL(TTimeIntervalMicroSeconds32 aRecordTime)=0;

Description

Records user utterance for training and recognition.

Parameters

TTimeIntervalMicroSeconds32 aRecordTime

A recording time in microseconds.


MSrRemoveGrammarL()

virtual void MSrRemoveGrammarL(TGrammarID aGrammarID)=0;

Description

Removes the specified grammar from the permanent storage.

Removing a grammar will remove all rules within the grammar.

Parameters

TGrammarID aGrammarID

The grammar ID.


MSrRemoveLexiconL()

virtual void MSrRemoveLexiconL(TLexiconID aLexiconID)=0;

Description

Removes the specified lexicon from the permanent storage.

Removing a lexicon will remove all pronunciations within the lexicon.

Parameters

TLexiconID aLexiconID

The lexicon ID.


MSrRemoveModelBankL()

virtual void MSrRemoveModelBankL(TModelBankID aModelBankID)=0;

Description

Removes the specified model bank from the permanent storage.

Removing a model bank will remove all models within the model bank.

Parameters

TModelBankID aModelBankID

The model bank ID.


MSrRemoveModelL()

virtual void MSrRemoveModelL(TModelBankID aModelBankID, TModelID aModelID)=0;

Description

Removes the specified model from the specified model bank permanently.

Parameters

TModelBankID aModelBankID

The model bank ID.

TModelID aModelID

The model ID.


MSrRemovePronunciationL()

virtual void MSrRemovePronunciationL(TLexiconID aLexiconID, TPronunciationID aPronunciationID)=0;

Description

Removes the specified pronunciation from the specified lexicon permanently.

Parameters

TLexiconID aLexiconID

The lexicon ID.

TPronunciationID aPronunciationID

The pronunciation ID.


MSrRemoveRuleL()

virtual void MSrRemoveRuleL(TGrammarID aGrammarID, TRuleID aRuleID)=0;

Description

Removes the specified rule from the specified grammar permanently.

Parameters

TGrammarID aGrammarID

The grammar ID.

TRuleID aRuleID

The rule ID.


MSrSetClientUid()

virtual void MSrSetClientUid(TUid aClientUid)=0;

Description

Sets the specified grammar client UID.

Parameters

TUid aClientUid

The client UID.


MSrStartRecSessionL()

virtual void MSrStartRecSessionL(TRecognitionMode aMode)=0;

Description

Starts a new recognition session.

Parameters

TRecognitionMode aMode

The recognition mode.


MSrTrainL()

virtual void MSrTrainL(TModelBankID aModelBankID, TModelID &aModelID)=0;

Description

Trains a new model into the specified model bank.

Parameters

TModelBankID aModelBankID

The model bank ID.

TModelID &aModelID

A reference to where the new model ID is assigned.


MSrUnloadRuleL()

virtual void MSrUnloadRuleL(TGrammarID aGrammarID, TRuleID aRuleID)=0;

Description

Unloads the specified rule from the specified grammar in temporary memory, previously loaded with LoadGrammarL().

The rule in the permanent storage remains intact.

Parameters

TGrammarID aGrammarID

The grammar ID.

TRuleID aRuleID

The rule ID.


MSrLoadEngineParametersL()

virtual void MSrLoadEngineParametersL(const RArray< TInt > &aParameterId, const RArray< TInt > &aParameterValue)=0;

Description

Unloads the specified parameters to the engine.

Parameters

const RArray< TInt > &aParameterId

An array of parameter IDs.

const RArray< TInt > &aParameterValue

An array of parameter values.