CNssSpeechItem Class Reference
class CNssSpeechItem : public CBase
|
Nested Classes and Structures
Public Member Functions
|
|
~CNssSpeechItem
()
|
TNssSpeechItemResult
|
CancelL
()
|
MNssCoreSrsDBEventHandler::TNssSrsDBResult
|
CommitSrsChanges
()
|
CNssSpeechItem
*
|
CopyL
(
CNssContext
*)
|
void
|
DelayedTrainingComplete
(
TUint32
)
|
TUint32
|
GrammarId
()
|
TBool
|
IsPlayingSupported
()
|
void
|
MapcCustomCommandEvent
(
TInt
,
TInt
)
|
void
|
MapcInitComplete
(
TInt
, const
TTimeIntervalMicroSeconds
&)
|
void
|
MapcPlayComplete
(
TInt
)
|
void
|
MsruoEvent
(
TUid
,
TInt
)
|
MNssCoreSrsDBEventHandler::TNssSrsDBResult
|
NSSBeginDeleteFromSrs
(
MNssDeleteTagClient
*,
CNssTag
*)
|
MNssCoreSrsDBEventHandler::TNssSrsDBResult
|
NSSBeginSaveToSrs
(
MNssSaveTagClient
*,
CNssTag
*)
|
CNssSpeechItem
*
|
NewL
(
CNssContext
&,
CNssSpeechItemSrsPortal
&,
CNssSpeechItemTrainer
&)
|
CNssSpeechItem
*
|
NewL
(
CNssContext
&,
CNssSpeechItemSrsPortal
&,
CNssSpeechItemTrainer
&,
TUint32
, const
TDesC
&)
|
CNssSpeechItem
*
|
NewLC
(
CNssContext
&,
CNssSpeechItemSrsPortal
&,
CNssSpeechItemTrainer
&,
TUint32
, const
TDesC
&)
|
HBufC
*
|
PartialTextL
(const
TDesC
&)
|
TNssSpeechItemResult
|
PlayL
(
MNssPlayEventHandler
*)
|
TNssSpeechItemResult
|
PlayL
(
MNssPlayEventHandler
*,
TLanguage
)
|
TDesC
&
|
RawText
()
|
TNssSpeechItemResult
|
RecordL
(
MNssTrainVoiceEventHandler
*)
|
MNssCoreSrsDBEventHandler::TNssSrsDBResult
|
RollbackSrsChanges
()
|
TUint32
|
RuleID
()
|
void
|
SetRuleID
(
TUint32
)
|
void
|
SetTagId
(
TInt
)
|
void
|
SetTextL
(const
TDesC
&)
|
void
|
SetTrained
(
TBool
)
|
void
|
SetTrainedType
(
TNssVasCoreConstant::TNssTrainedType
)
|
TInt
|
TagId
()
|
TDesC
&
|
Text
()
|
TNssSpeechItemResult
|
TrainTextL
(
MNssTrainTextEventHandler
*,
CNssTrainingParameters
*)
|
TNssSpeechItemResult
|
TrainVoiceL
(
MNssTrainVoiceEventHandler
*)
|
TBool
|
Trained
()
|
TNssVasCoreConstant::TNssTrainedType
|
TrainedType
()
|
CArrayFixFlat
<
TNssVasCoreConstant::TNssTrainingCapability
> *
|
TrainingCapabilities
()
|
Constructor & Destructor Documentation
CNssSpeechItem(CNssContext &, CNssSpeechItemSrsPortal &, CNssSpeechItemTrainer &)
Member Functions Documentation
CancelL()
TNssSpeechItemResult
|
CancelL
|
(
|
)
|
|
Method called by the client to cancel the previous operation.
CleanPlayback()
void
|
CleanPlayback
|
(
|
)
|
[private]
|
This method releases resources, which were reserved for playing, and updated the state from PlayingStrated to Idle.
CleanUp()
void
|
CleanUp
|
(
|
)
|
[private]
|
CommitSrsChanges()
Method to commit the transaction to the SRS. This is a SYNCHRONOUS method.
-
Since
-
2.0
ConstructL(TUint32, const TDesC &)
void
|
ConstructL
|
(
|
TUint32
|
aRuleID,
|
|
const
TDesC
&
|
aText
|
|
)
|
[private]
|
Symbian 2nd phase constructor
Parameters
TUint32
aRuleID
|
Rule ID value
|
const
TDesC
& aText
|
Reference to the TDesc text
|
CopyL(CNssContext *)
Create a copy of the SpeechItem object. This cunction creates a new SpeechItem by allocating memory for a new SpeechItem, and deep copying the members of the SpeechItem on which this fucntion is called. Old SpeechItem and new SpeechItem exist. Client need to deallocate memory for both.
CopyUtteranceData()
void
|
CopyUtteranceData
|
(
|
)
|
[private]
|
Method to copy utterance data from current to transient values
DelayedTrainingComplete(TUint32)
void
|
DelayedTrainingComplete
|
(
|
TUint32
|
aRuleID
|
)
|
|
Updates the speech item after training.
DoAddPronounciationFailEvent(TInt)
void
|
DoAddPronounciationFailEvent
|
(
|
TInt
|
aResult
|
)
|
[private]
|
Method to handle the "AddPronunciation" fail from SRS
Parameters
TInt
aResult
|
a Result value from the event
|
DoAddPronunciationCompleteEvent()
void
|
DoAddPronunciationCompleteEvent
|
(
|
)
|
[private]
|
Method to handle the "AddPronunciation" complete from SRS
DoGetAvailableStorageCompleteEvent()
void
|
DoGetAvailableStorageCompleteEvent
|
(
|
)
|
[private]
|
Method to handle the "GetAvailableStorageEvent" complete from SRS
DoGetUtteranceDurationCompleteEvent()
void
|
DoGetUtteranceDurationCompleteEvent
|
(
|
)
|
[private]
|
Method to handle the "GetUtteranceDurationEvent" complete from SRS
DoPlayCompleteEvent()
void
|
DoPlayCompleteEvent
|
(
|
)
|
[private]
|
Method to handle the "PlayEvent" complete from SRS
DoPlayFailEvent(TInt)
void
|
DoPlayFailEvent
|
(
|
TInt
|
aResult
|
)
|
[private]
|
Method to handle the "PlayEvent" fail from SRS
Parameters
TInt
aResult
|
- a Result value from the Play operation
|
DoPlayL()
void
|
DoPlayL
|
(
|
)
|
[private]
|
This method starts playback with CTtsUtility.
DoPlayResult(TInt)
Method to process the SRS play error
Parameters
TInt
aResult
|
the result value from SRS which indicates an error
|
DoRemoveModelCompleteEvent()
void
|
DoRemoveModelCompleteEvent
|
(
|
)
|
[private]
|
Method to handle the "RemoveModel" complete from SRS
DoRemoveModelFailEvent(TInt)
void
|
DoRemoveModelFailEvent
|
(
|
TInt
|
aResult
|
)
|
[private]
|
Method to handle the "RemoveModel" fail from SRS
Parameters
TInt
aResult
|
a Result value from the event
|
DoRetry()
TBool
|
DoRetry
|
(
|
)
|
[private]
|
Method to verify whether it is ok to retry
DoSrsDBResult(TInt)
Method to process the SRS DB error
Parameters
TInt
aResult
|
the result value from SRS to indicate an error
|
DoTrainCompleteEvent()
void
|
DoTrainCompleteEvent
|
(
|
)
|
[private]
|
Method to handle the "TrainEvent" complete from SRS
DoTrainFailEvent(TInt)
void
|
DoTrainFailEvent
|
(
|
TInt
|
aResult
|
)
|
[private]
|
Method to process the various train failed events from SRS'
Parameters
TInt
aResult
|
the result value to indicate an error
|
DoTrainResult(TInt)
Method to process the SRS train error
Parameters
TInt
aResult
|
the result value from SRS which indicates an error
|
GrammarId()
Method to return the Grammar ID from the context of the speech item.
IsPlayingSupported()
TBool
|
IsPlayingSupported
|
(
|
)
|
|
Method to query playing support.
MakePlayCallback(TInt)
void
|
MakePlayCallback
|
(
|
TInt
|
aResult
|
)
|
[private]
|
Makes the callback after playing has completed or failed.
MapcCustomCommandEvent(TInt, TInt)
void
|
MapcCustomCommandEvent
|
(
|
TInt
|
aEvent,
|
|
TInt
|
aError
|
|
)
|
|
MapcInitComplete(TInt, const TTimeIntervalMicroSeconds &)
Method to signal that playing has been initialized.
MapcPlayComplete(TInt)
void
|
MapcPlayComplete
|
(
|
TInt
|
aError
|
)
|
|
Method to signal that playing has been completed.
Parameters
TInt
aError
|
Successful or not
|
MsruoEvent(TUid, TInt)
void
|
MsruoEvent
|
(
|
TUid
|
aEvent,
|
|
TInt
|
aResult
|
|
)
|
|
Parameters
TUid
aEvent
|
an event from the SRS utility object
|
TInt
aResult
|
the result from aEvent operation
|
NSSBeginDeleteFromSrs(MNssDeleteTagClient *, CNssTag *)
Method to start transaction for deleting tags from SRS and VAS DB.
NSSBeginSaveToSrs(MNssSaveTagClient *, CNssTag *)
Method to start transaction for saving the data into the SRS.
NewL(CNssContext &, CNssSpeechItemSrsPortal &, CNssSpeechItemTrainer &)
NewL(CNssContext &, CNssSpeechItemSrsPortal &, CNssSpeechItemTrainer &, TUint32, const TDesC &)
NewLC(CNssContext &, CNssSpeechItemSrsPortal &, CNssSpeechItemTrainer &, TUint32, const TDesC &)
NotifyHandlerForUnexpectedEvent()
void
|
NotifyHandlerForUnexpectedEvent
|
(
|
)
|
[private]
|
Method to notify the event handler for receiving the Unexpected Event
PartialTextL(const TDesC &)
HBufC
*
|
PartialTextL
|
(
|
const
TDesC
&
|
aIdentifier
|
)
|
|
Returns the part of text which identified with the given id. If
RawText()
is for example "_1Amy_1Harris_2mobile" then PartialTextL( _L( "1" ) ) call will return "Amy Harris".
Parameters
const
TDesC
& aIdentifier
|
ID of the text part to return Text or KNullDesC if identifier is not found
|
PlayL(MNssPlayEventHandler *)
Method called by the client to indicate to SRS that a playback is needed.
PlayL(MNssPlayEventHandler *, TLanguage)
Method called by the client to indicate to SRS that a playback is needed with a certain language.
Parameters
MNssPlayEventHandler
* aPlayEventHandler
|
a call back object to handle the play events
|
TLanguage
aLanguage
|
language which will be used in playback
|
RawText()
Returns the raw training text from where escape characters are not removed. Should not be used by clients who want to display the string.
RecordL(MNssTrainVoiceEventHandler *)
The Record method is used by the client in the train voice sequence for SRS to record input speech.
RollbackSrsChanges()
Method to end the transaction without committing.. This is a SYNCHRONOUS method.
-
Since
-
2.8
RuleID()
Method to return the rule ID
SetRuleID(TUint32)
Method to set the rule ID
SetTagId(TInt)
void
|
SetTagId
|
(
|
TInt
|
aTagId
|
)
|
|
Method to set the Tag ID
-
Since
-
2.0
SetTextL(const TDesC &)
void
|
SetTextL
|
(
|
const
TDesC
&
|
aText
|
)
|
|
Method to set the training text
Parameters
const
TDesC
& aText
|
Text which will be trained
|
SetTrained(TBool)
void
|
SetTrained
|
(
|
TBool
|
aTrained
|
)
|
|
Method to set the Trained flag for True or False
Parameters
TBool
aTrained
|
Trained flag
|
SetTrainedType(TNssVasCoreConstant::TNssTrainedType)
Method to set the Training Type
TagId()
Method to return the Tag ID
Text()
Method to return the Text
TrainTextL(MNssTrainTextEventHandler *, CNssTrainingParameters *)
Method to train a speech model from text.
TrainVoiceL(MNssTrainVoiceEventHandler *)
Method called by the client to indicate to SRS that training is needed.
Trained()
Method to return the Trained flag
TrainedType()
Method to return the Training Type
TrainingCapabilities()
The TrainingCapabilities member fucntion is used by the client to get training capabilities to beused in Speaker Independent voice recognition.
Member Data Documentation
TNssSpeechItemConstant::TNssState
iOldState
TTimeIntervalMicroSeconds32
iPlayDuration
MNssPlayEventHandler * iPlayEventHandler
CNssSpeechItemSrsPortal & iPortal
TNssSpeechItemConstant::TNssState
iState
MNssTrainVoiceEventHandler * iTrainVoiceEventHandler
TNssVasCoreConstant::TNssTrainedType
iTrainedType
CNssSpeechItemTrainer & iTrainer
HBufC * iTrimmedText
HBufC
*
|
iTrimmedText
|
[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.