class CRecognitionAlgMgr : public CActive |
This class is an aggregation of all related algorithms. It manages the algorithms and coordinate transfer of data.
Private Member Functions | |
---|---|
CRecognitionAlgMgr(MRecAlgMgrObserver &) | |
void | ConstructL() |
void | DoCancel() |
void | HandleActivateGrammar() |
void | HandleDeActivateGrammar() |
void | HandleInitFrontEnd() |
void | HandleInitRecognizerBE() |
void | HandleInitTrainBE() |
void | HandleLoadGrammar() |
void | HandleLoadLexicon() |
void | HandleLoadModels() |
void | HandleUnloadGrammar() |
void | HandleUnloadRule() |
void | HandleUtteranceDataRcvd() |
void | Ready(const TInt) |
void | RunL() |
Private Member Enumerations | |
---|---|
enum | TAlgState { EIdle = 0, EProcessing, ECancel } |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Inherited Attributes | |
---|---|
CActive::iStatus |
CRecognitionAlgMgr | ( | MRecAlgMgrObserver & | aObserver | ) | [private] |
C++ default constructor.
MRecAlgMgrObserver & aObserver |
void | ActivateGrammarL | ( | const TSIGrammarID | aGrammarID | ) |
Activates a grammar.
const TSIGrammarID aGrammarID |
void | AdaptModelsL | ( | const CSIResultSet & | aResultSet, |
TInt | aResultIndex, | |||
TLanguage | aLanguage | |||
) |
Adapts models
2.8
const CSIResultSet & aResultSet | |
TInt aResultIndex | |
TLanguage aLanguage |
void | CombineComplete | ( | HBufC8 * | aResult, |
TInt | aError | |||
) |
Grammar combination has been completed.
void | DeactivateGrammarL | ( | const TSIGrammarID | aGrammarID | ) |
Deactivates a grammar
const TSIGrammarID aGrammarID |
void | DoCancel | ( | ) | [private, virtual] |
Implements cancellation of an outstanding request.
This function is called as part of the active object's Cancel().
It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.
DoCancel() must not wait for event completion; this is handled by Cancel().
void | EndRecSession | ( | ) |
This method is used to indicate the end of a recognition session. The EndRecSession() method should be used to end the session.
void | GetEnginePropertiesL | ( | const RArray< TInt > & | aPropertyId, |
RArray< TInt > & | aPropertyValue | |||
) |
Retreive the properties of the underlying speech recognition engine.
void | GetGrammarL | ( | const TSIGrammarID | aGrammarID, |
CSICompiledGrammar ** | aSIActiveGrammar, | |||
CSICompiledGrammar ** | aSIDeActivatedGrammar | |||
) |
Get the specified grammar.
const TSIGrammarID aGrammarID | |
CSICompiledGrammar ** aSIActiveGrammar | |
CSICompiledGrammar ** aSIDeActivatedGrammar |
TBool | GetUtteranceDuration | ( | TUint32 & | aStartFrame, |
TUint32 & | aEndFrame, | |||
TReal & | aFrameLength | |||
) |
Retreive the duration of the utterance detected by the algorithm.
void | HandleInitFrontEnd | ( | ) | [private] |
The following methods are asynchronous handlers for the corresponding synchronous calls.
void | InitFrontEnd | ( | TRecognizerMode | aFeMode | ) |
Initializes the front-end module in the speech recognition engine. The frontend module used during training/recognition functions is started as a result. This method is intended to be used in conjunction with InitTrainBE().
TRecognizerMode aFeMode |
void | InitRecognizerBE | ( | CSIResultSet & | aResult | ) |
Initialize the recognition engine back-end. The module responsible for recognition function is started as a result. This method must be used before any recognition operations and intended to be used in conjunction with InitFrontEnd().
CSIResultSet & aResult | A reference to an object where the recognition result will be written. |
void | LoadEnginePropertiesL | ( | const RArray< TInt > & | aParameterId, |
const RArray< TInt > & | aParameterValue | |||
) |
Load the specified parameter(s) to the engines.
void | LoadGrammarL | ( | const CSIGrammar & | aGrammar | ) |
Load the specified grammar into the recognizer.
const CSIGrammar & aGrammar | A reference to a grammar in an internal format. |
void | LoadGrammarL | ( | const CSICompiledGrammar & | aGrammar | ) |
const CSICompiledGrammar & aGrammar |
void | LoadLexiconL | ( | const CSILexicon & | aLexicon | ) |
Load the specified lexicon into the recognizer.
const CSILexicon & aLexicon | A reference to a lexicon in an internal format. |
void | LoadModelsL | ( | const CSDModelBank & | aModels | ) |
Load the specified model bank into the recognizer.
const CSDModelBank & aModels | A reference to a model bank. |
void | LoadModelsL | ( | const CSIModelBank & | aModels | ) |
const CSIModelBank & aModels |
void | MaahdAdaptationComplete | ( | TInt | aError | ) |
Called when adaptation has been done
TInt aError |
void | MarhdoEouDetected | ( | TInt | aError | ) |
TInt aError | Recognition result code. KErrNone if successful, otherwise KErrTooLong, KErrTooShort, KErrAsrSpeechTooEarly, KErrNoSpeech |
void | MarhdoFeatureVector | ( | const TDesC8 & | aFV, |
TInt32 | aSNR, | |||
TInt32 | aPosition | |||
) |
void | MarhdoInitRecognizerBEComplete | ( | TInt | aError | ) |
TInt aError | Initialization result code. KErrNone if successful otherwise a system-wide error code. |
void | MarhdoInitRecognizerFEComplete | ( | TInt | aError | ) |
TInt aError | Initialization result code. KErrNone if successful otherwise a system-wide error code. |
void | MarhdoInitializationComplete | ( | TInt | aError | ) |
TInt aError | Initialization result code. KErrNone if successful otherwise a system-wide error code. |
void | MarhdoRecognitionComplete | ( | TInt | aError | ) |
TInt aError | Recognition result code. KErrNone if successful. KErrRejected if the recognition result is rejected, otherwise a system-wide error code |
void | MarhdoRequestSpeechData | ( | ) |
CRecognitionAlgMgr * | NewL | ( | MRecAlgMgrObserver & | aObserver | ) | [static] |
Two-phased constructor.
MRecAlgMgrObserver & aObserver |
void | Ready | ( | const TInt | aStatus | ) | [private] |
Used to complete a request
const TInt aStatus |
void | RunL | ( | ) | [private, virtual] |
Handles an active object's request completion event.
A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.
The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.
Before calling this active object's RunL() function, the active scheduler has:
1. decided that this is the highest priority active object with a completed request
2. marked this active object's request as complete (i.e. the request is no longer outstanding)
RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.
Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.
CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD
void | SendSpeechData | ( | TPtrC8 & | aBuffer, |
TBool | aEnd | |||
) |
Use to send the utterance data as a response to the RequestSpeechData().
void | SetRejection | ( | TUint32 | aRejection | ) |
Sets rejection value
TUint32 aRejection |
TInt | StartRecSession | ( | TRecognizerMode | aMode | ) |
Request to start a recognition session.
TRecognizerMode aMode |
void | UnloadGrammarL | ( | const CSIGrammar & | aGrammar | ) |
Unloads the specified grammar from the recognizer.
const CSIGrammar & aGrammar | A reference to a grammar. |
void | UnloadGrammarL | ( | const CSICompiledGrammar & | aGrammar | ) |
const CSICompiledGrammar & aGrammar |
void | UnloadRule | ( | TSIGrammarID | aGrammarID, |
TSIRuleID | aRuleID | |||
) |
Request to unload the specified rule in the grammar from recognizer.
TSIGrammarID aGrammarID | |
TSIRuleID aRuleID |
RPointerArray< TSIRuleVariantInfo > | iBlackList | [private] |
RPointerArray< CSICompiledGrammar > | iSIActiveGrammars | [private] |
RPointerArray< CSICompiledGrammar > | iSIDeActivatedGrammars | [private] |
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.