MSISpeechRecognitionUtilityBase Class Reference
class MSISpeechRecognitionUtilityBase
|
Public Member Functions
|
|
~MSISpeechRecognitionUtilityBase
()
|
TInt
|
ActivateGrammar
(
TSIGrammarID
)
|
TInt
|
Adapt
(const
CSIClientResultSet
&,
TInt
)
|
TInt
|
AddPronunciation
(
TSILexiconID
, const
TDesC
&,
TLanguage
,
TSIPronunciationID
&)
|
TInt
|
AddRule
(
TSIGrammarID
,
TSILexiconID
,
TSIPronunciationID
,
TSIRuleID
&)
|
TInt
|
AddRuleVariant
(
TSIGrammarID
,
TSILexiconID
,
RArray
<
TSIPronunciationID
> &,
TSIRuleID
,
TSIRuleVariantID
&)
|
TInt
|
AddVoiceTag
(MDesCArray &, const
RArray
<
TLanguage
> &,
TSILexiconID
,
TSIGrammarID
,
TSIRuleID
&)
|
TInt
|
AddVoiceTag
(MDesCArray &, const
RArray
<
RLanguageArray
> &,
TSILexiconID
,
TSIGrammarID
,
TSIRuleID
&)
|
TInt
|
AddVoiceTags
(const
RPointerArray
< MDesCArray > &, const
RArray
<
TLanguage
> &,
TSILexiconID
,
TSIGrammarID
,
RArray
<
TSIRuleID
> &)
|
TInt
|
AddVoiceTags
(const
RPointerArray
< MDesCArray > &, const
RArray
<
RLanguageArray
> &,
TSILexiconID
,
TSIGrammarID
,
RArray
<
TSIRuleID
> &)
|
void
|
Cancel
()
|
TInt
|
CommitChanges
()
|
TInt
|
CreateGrammar
(
TSIGrammarID
&)
|
void
|
CreateInstanceSecondPhaseL
(
TUid
,
TUid
,
MSISpeechRecognitionUtilityObserver
&)
|
TInt
|
CreateLexicon
(
TSILexiconID
&)
|
TInt
|
CreateModelBank
(
TSIModelBankID
&)
|
TInt
|
CreateRule
(
TSIGrammarID
,
TSIRuleID
&)
|
TInt
|
DeactivateGrammar
(
TSIGrammarID
)
|
TInt
|
EndRecSession
()
|
TInt
|
EndRecord
()
|
TInt
|
GetAllClientGrammarIDs
(
RArray
<
TSIGrammarID
> &)
|
TInt
|
GetAllClientLexiconIDs
(
RArray
<
TSILexiconID
> &)
|
TInt
|
GetAllClientModelBankIDs
(
RArray
<
TSIModelBankID
> &)
|
TInt
|
GetAllGrammarIDs
(
RArray
<
TSIGrammarID
> &)
|
TInt
|
GetAllLexiconIDs
(
RArray
<
TSILexiconID
> &)
|
TInt
|
GetAllModelBankIDs
(
RArray
<
TSIModelBankID
> &)
|
TInt
|
GetAllModelIDs
(
TSIModelBankID
,
RArray
<
TSIModelID
> &)
|
TInt
|
GetAllPronunciationIDs
(
TSILexiconID
,
RArray
<
TSIPronunciationID
> &)
|
TInt
|
GetAllRuleIDs
(
TSIGrammarID
,
RArray
<
TSIRuleID
> &)
|
TInt
|
GetEngineProperties
(const
RArray
<
TInt
> &,
RArray
<
TInt
> &)
|
TInt
|
GetModelCount
(
TSIModelBankID
,
TInt
&)
|
TInt
|
GetRuleValidity
(
TSIGrammarID
,
TSIRuleID
,
TBool
&)
|
TInt
|
LoadEngineParameters
(const
RArray
<
TInt
> &, const
RArray
<
TInt
> &)
|
TInt
|
LoadGrammar
(
TSIGrammarID
)
|
TInt
|
LoadLexicon
(
TSILexiconID
)
|
TInt
|
LoadModels
(
TSIModelBankID
)
|
TInt
|
PreStartSampling
()
|
TInt
|
Recognize
(
CSIClientResultSet
&)
|
TInt
|
Record
(
TTimeIntervalMicroSeconds32
)
|
TInt
|
RemoveGrammar
(
TSIGrammarID
)
|
TInt
|
RemoveLexicon
(
TSILexiconID
)
|
TInt
|
RemoveModel
(
TSIModelBankID
,
TSIModelID
)
|
TInt
|
RemoveModelBank
(
TSIModelBankID
)
|
TInt
|
RemovePronunciation
(
TSILexiconID
,
TSIPronunciationID
)
|
TInt
|
RemoveRule
(
TSIGrammarID
,
TSIRuleID
)
|
TInt
|
RemoveRules
(
TSIGrammarID
,
RArray
<
TSIRuleID
> &)
|
TInt
|
SetAudioPriority
(
TInt
,
TInt
,
TInt
,
TInt
)
|
void
|
SetEventHandler
(
MSISpeechRecognitionUtilityObserver
*)
|
TInt
|
StartRecSession
(
TNSSRecognitionMode
)
|
TInt
|
UnloadGrammar
(
TSIGrammarID
)
|
TInt
|
UnloadRule
(
TSIGrammarID
,
TSIRuleID
)
|
Constructor & Destructor Documentation
~MSISpeechRecognitionUtilityBase()
~MSISpeechRecognitionUtilityBase
|
(
|
)
|
[inline, virtual]
|
Destructor. Defined here so that client can use M-class pointer to destroy the concrete C-object
Member Functions Documentation
ActivateGrammar(TSIGrammarID)
Reactivates a previously deactivated grammar.
Adapt(const CSIClientResultSet &, TInt)
Adapts the speaker independent models to a specific speaker's voice.
Parameters
const
CSIClientResultSet
& aResultSet
|
Recognition result N-Best
|
TInt
aCorrect
|
Index to N-Best pointing the correct result.
|
AddPronunciation(TSILexiconID, const TDesC &, TLanguage, TSIPronunciationID &)
Adds a new pronunciation for the given text phrase into the specified lexicon.
Parameters
TSILexiconID
aLexiconID
|
lexicon Id, where the new pronunciation is added to
|
const
TDesC
& aTextForTraining
|
Text to be trained
|
TLanguage
aLanguage
|
Pronunciation language
|
TSIPronunciationID
& aPronunciationID
|
reference where a new pronunciation Id is assigned to
|
AddRule(TSIGrammarID, TSILexiconID, TSIPronunciationID, TSIRuleID &)
Adds a new rule for the given pronunciation into the specified grammar.
AddRuleVariant(TSIGrammarID, TSILexiconID, RArray< TSIPronunciationID > &, TSIRuleID, TSIRuleVariantID &)
Adds a new rule variant for the given pronunciation into the specified grammar.
AddVoiceTag(MDesCArray &, const RArray< TLanguage > &, TSILexiconID, TSIGrammarID, TSIRuleID &)
Adds a new rule for the given phrase into the specified grammar.
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 &)
Adds a new rule for the given phrase into the specified grammar.
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 > &)
Adds a new rules for the given phrases into the specified grammar.
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 > &)
Adds a new rules for the given phrases into the specified grammar.
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()
void
|
Cancel
|
(
|
)
|
[pure virtual]
|
Cancels the current operation
CommitChanges()
TInt
|
CommitChanges
|
(
|
)
|
[pure virtual]
|
Saves the changes into a permanent storage.
CreateGrammar(TSIGrammarID &)
Parameters
TSIGrammarID
& aGrammarID
|
reference where grammar ID is stored
|
CreateInstanceSecondPhaseL(TUid, TUid, MSISpeechRecognitionUtilityObserver &)
Second phase construction. Needed when dynamically loading nsssispeechrecognitionutility.dll Direct users of
CSISpeechRecognitionUtility
should not use this.
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 &)
Parameters
TSILexiconID
& aLexiconID
|
reference where lexicon ID is stored
|
CreateModelBank(TSIModelBankID &)
Creates a new model bank.
Parameters
TSIModelBankID
& aModelBankID
|
reference where a new model bank Id is assigned to
|
CreateRule(TSIGrammarID, TSIRuleID &)
Parameters
TSIGrammarID
aGrammarID
|
grammar, where the new rule is to be added
|
TSIRuleID
& aRuleID
|
reference where rule ID is stored
|
DeactivateGrammar(TSIGrammarID)
Deactivates a loaded grammar, so that it is not recognized.
EndRecSession()
TInt
|
EndRecSession
|
(
|
)
|
[pure virtual]
|
Ends the current recognition session. Resources allocated for recognition are freed.
EndRecord()
TInt
|
EndRecord
|
(
|
)
|
[pure virtual]
|
Stops the recording. The difference with Cancel is that if enough samples were recorded, a recognition result will be produced.
GetAllClientGrammarIDs(RArray< TSIGrammarID > &)
Returns all grammar Ids that belong to the current client.
GetAllClientLexiconIDs(RArray< TSILexiconID > &)
Returns all lexicon Ids that belong to the current client.
GetAllClientModelBankIDs(RArray< TSIModelBankID > &)
Returns all model bank Ids that belong to the current client.
GetAllGrammarIDs(RArray< TSIGrammarID > &)
Returns all grammar Ids that exist (for all clients).
GetAllLexiconIDs(RArray< TSILexiconID > &)
Returns all lexicon Ids that exist (for all clients).
GetAllModelBankIDs(RArray< TSIModelBankID > &)
Returns all model bank Ids that exist (for all clients).
GetAllModelIDs(TSIModelBankID, RArray< TSIModelID > &)
Returns all model Ids that exist in the specified model bank.
GetAllPronunciationIDs(TSILexiconID, RArray< TSIPronunciationID > &)
Returns all pronunciation Ids that exist in the specified lexicon.
GetAllRuleIDs(TSIGrammarID, RArray< TSIRuleID > &)
Returns all rule Ids that exist in the specified grammar.
GetEngineProperties(const RArray< TInt > &, RArray< TInt > &)
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
|
constant reference to array of engine property Ids
|
RArray
<
TInt
> & aPropertyValue
|
reference to array of engine property values
|
GetModelCount(TSIModelBankID, TInt &)
Returns the number of models in the specified model bank.
GetRuleValidity(TSIGrammarID, TSIRuleID, TBool &)
Checks if the rule is valid or not.
LoadEngineParameters(const RArray< TInt > &, const RArray< TInt > &)
TInt
|
LoadEngineParameters
|
(
|
const
RArray
<
TInt
> &
|
aParameterId,
|
|
const
RArray
<
TInt
> &
|
aParameterValue
|
|
)
|
[pure virtual]
|
Uploads the specified parameters into the engine.
Parameters
const
RArray
<
TInt
> & aParameterId
|
array of parameter IDs
|
const
RArray
<
TInt
> & aParameterValue
|
array of parameter values
|
LoadGrammar(TSIGrammarID)
Loads the specified grammar into the recognizer. done prior to recognition.
LoadLexicon(TSILexiconID)
Loads the specified lexicon into the recognizer; done prior to recognition.
LoadModels(TSIModelBankID)
Loads the specified model bank into the recognizer. done prior to recognition.
PreStartSampling()
TInt
|
PreStartSampling
|
(
|
)
|
[pure virtual]
|
Pre-starts samping before Record call.
Recognize(CSIClientResultSet &)
Initiates speaker independent recognition; performed following loading of model bank, lexicon, and grammar.
Record(TTimeIntervalMicroSeconds32)
Records utterance for recognition.
RemoveGrammar(TSIGrammarID)
Removes the specified grammar from the permanent storage. Removing a grammar will remove all rules within the grammar.
RemoveLexicon(TSILexiconID)
Removes the specified lexicon from the permanent storage. Removing a lexicon will remove all pronunciations within the lexicon.
RemoveModel(TSIModelBankID, TSIModelID)
Removes the specified model from the specified model bank permanently.
RemoveModelBank(TSIModelBankID)
Removes the specified model bank from the permanent storage. Removing a model bank will remove all models within the model bank.
RemovePronunciation(TSILexiconID, TSIPronunciationID)
Removes the specified pronunciation from the specified lexicon permanently.
RemoveRule(TSIGrammarID, TSIRuleID)
Removes the specified rule from the specified grammar permanently.
RemoveRules(TSIGrammarID, RArray< TSIRuleID > &)
Removes multiple rules from the specified grammar permanently.
SetAudioPriority(TInt, TInt, TInt, TInt)
TInt
|
SetAudioPriority
|
(
|
TInt
|
aPriority,
|
|
TInt
|
aTrainPreference,
|
|
TInt
|
aPlaybackPreference,
|
|
TInt
|
aRecognitionPreference
|
|
)
|
[pure virtual]
|
Set the audio priority and preference recognition
Parameters
TInt
aPriority
|
priority for voice recognition
|
TInt
aTrainPreference
|
preference for training
|
TInt
aPlaybackPreference
|
preference for playback
|
TInt
aRecognitionPreference
|
preference for recognition
|
SetEventHandler(MSISpeechRecognitionUtilityObserver *)
Set the event handler for asynchronous events
StartRecSession(TNSSRecognitionMode)
Starts a new recognition session.
UnloadGrammar(TSIGrammarID)
Unloads the specified grammar from the list of grammars in temporary memory, previously loaded with LoadGrammarL. The grammar in the permanent storage remains intact.
UnloadRule(TSIGrammarID, TSIRuleID)
Unloads the specified rule from the specified grammar in temporary memory, previously loaded with LoadGrammarL. The rule in the permanent storage remains intact.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.