MNssSpeechItem Class Reference

class MNssSpeechItem

The MSpeechItem class represents the speech part of a voice tag. The MSeechItem provides speech methods to the client. The methods are used by the client to request speech services from SRS

NssVASApi.lib
Since
2.0

Member Functions Documentation

CancelL()

TNssSpeechItemResult CancelL ( ) [pure virtual]

Method called by the client to cancel the previous operation.

Since
2.0

IsPlayingSupported()

TBool IsPlayingSupported ( ) [pure virtual]

Playing a tag is not supported, if the recognition technology is speaker independent and speech synthesis is not present.

Since
2.0

PartialTextL(const TDesC &)

HBufC * PartialTextL ( const TDesC & aIdentifier ) [pure virtual]

Returns the part of text which identified with the given id. If RawText() is for example "_1Amy_1Harris_2mobile" then PartialText( _L( "1" ) ) call will return "Amy Harris".

Since
3.2

Parameters

const TDesC & aIdentifier ID of the text part to return

PlayL(MNssPlayEventHandler *)

TNssSpeechItemResult PlayL ( MNssPlayEventHandler * aPlayEventHandler ) [pure virtual]

Method called by the client to indicate to SRS that a playback is needed.

Since
2.0

Parameters

MNssPlayEventHandler * aPlayEventHandler A call back object to handle the play events

PlayL(MNssPlayEventHandler *, TLanguage)

TNssSpeechItemResult PlayL ( MNssPlayEventHandler * aPlayEventHandler,
TLanguage aLanguage
) [pure virtual]

Method called by the client to indicate to SRS that a playback is needed with a certain language.

Since
2.8

Parameters

MNssPlayEventHandler * aPlayEventHandler A call back object to handle the play events
TLanguage aLanguage Language which will be used in playback

RawText()

TDesC & RawText ( ) [pure virtual]

Returns the raw training text from where escape characters are not removed. Should not be used by clients who want to display the string.

Since
3.2

RecordL(MNssTrainVoiceEventHandler *)

TNssSpeechItemResult RecordL ( MNssTrainVoiceEventHandler * aTrainVoiceEventHandler ) [pure virtual]

The Record method is used by the client to record input speech.

Since
2.0

Parameters

MNssTrainVoiceEventHandler * aTrainVoiceEventHandler A call back object to handle the record events

SetTextL(const TDesC &)

void SetTextL ( const TDesC & aText ) [pure virtual]

The SetTextL method is used by the client to initialize the Text data member

Since
2.0

Parameters

const TDesC & aText the reference of a text buffer

Text()

TDesC & Text ( ) [pure virtual]

The Text member fucntion is used by the client to get text to be used in Speaker Independent voice recognition. The text can also be used to identify the voice tag, and can be used for user display by the client.

Since
2.0

TrainTextL(MNssTrainTextEventHandler *, CNssTrainingParameters *)

TNssSpeechItemResult TrainTextL ( MNssTrainTextEventHandler * aEventHandler,
CNssTrainingParameters * aTrainingParams
) [pure virtual]

Trains the speech model. The model is based on the text which was given earlier at SetTextL.

Since
2.0

Parameters

MNssTrainTextEventHandler * aEventHandler To inform the client when the training has finished.
CNssTrainingParameters * aTrainingParams Training parameters

TrainVoiceL(MNssTrainVoiceEventHandler *)

TNssSpeechItemResult TrainVoiceL ( MNssTrainVoiceEventHandler * aTrainVoiceEventHandler ) [pure virtual]

Method called by the client to indicate to SRS that training is needed.

Since
2.0

Parameters

MNssTrainVoiceEventHandler * aTrainVoiceEventHandler A call back object to handle the train events

TrainedType()

TNssVasCoreConstant::TNssTrainedType TrainedType ( ) [pure virtual]

The GetTrainedType member function is used by the client to get train type to be used in Speaker Independent voice recognition.

Since
2.0

TrainingCapabilities()

CArrayFixFlat < TNssVasCoreConstant::TNssTrainingCapability > * TrainingCapabilities ( ) [pure virtual]

The GetTrainingCapabilities member fucntion is used by the client to get training capabilities to beused in Speaker Independent voice recognition.

Since
2.0

Member Enumerations Documentation

Enum TNssSpeechItemResult

TNssSpeechItemResult will have all the enums to represent the return values from MSpeechItem's methods.

NOTE: The caller functions should be able to handle the unknown TNssSpeechItemResult enum values.

Enumerators

EVasErrorNone
EVasUnexpectedRequest
EVasInUse
EVasInvalidParameter
EVasPlayFailed
EVasTrainFailed