CDevTTS Class Reference

class CDevTTS : public CBase

CDevTTS is the interface towards DevTTS module. Actual implementation is not included in this class.

nssdevtts.lib
Since
2.8

Inherits from

Public Member Functions
~CDevTTS ()
IMPORT_C TTtsStyleID AddStyleL (const TTtsStyle &)
IMPORT_C TInt Balance ()
IMPORT_C void BufferProcessed (const TDesC8 &)
IMPORT_C TAny * CustomInterface ( TUid )
IMPORT_C void DeleteStyleL ( TTtsStyleID )
IMPORT_C void GetPositionL ( TTimeIntervalMicroSeconds &)
IMPORT_C void GetPositionL ( TTtsSegment &, TInt &)
IMPORT_C TBool IsLanguageSupported ( TLanguage )
IMPORT_C void LanguageIdentificationL ( CTtsParsedText &, TInt , RArray < TLanguage > &, RArray < TInt > &)
IMPORT_C TInt MaxVolume ()
IMPORT_C CDevTTS * NewL ( MDevTTSObserver &)
IMPORT_C void NormalizeAndSegmentTextL ( CTtsParsedText &)
IMPORT_C void NormalizeTextL ( CTtsParsedText &)
IMPORT_C TUint16 NumberOfStyles ()
IMPORT_C void Pause ()
IMPORT_C void PrimeSynthesisL ( MTtsSegmentStream &)
IMPORT_C void PrimeSynthesisL ( CTtsParsedText &)
IMPORT_C void SetAudioOutputL ( TInt )
IMPORT_C void SetAudioPriority ( TInt , TDevTTSAudioPreference )
IMPORT_C void SetBalance ( TInt )
IMPORT_C void SetPositionL (const TTimeIntervalMicroSeconds &)
IMPORT_C void SetPositionL (const TTtsSegment &, TInt )
IMPORT_C void SetVolume ( TInt )
IMPORT_C void SetVolumeRamp (const TTimeIntervalMicroSeconds &)
IMPORT_C void Stop ()
IMPORT_C TTtsStyle & StyleL ( TTtsStyleID )
IMPORT_C TTtsStyle & StyleL ( TUint16 )
IMPORT_C void SynthesizeL ( TDevTTSOutputMode )
IMPORT_C TInt Volume ()
Private Member Functions
CDevTTS ()
CDevTTS (const CDevTTS &)
void ConstructL ( MDevTTSObserver &)
CDevTTS & operator= (const CDevTTS &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CTTSAlgorithmManager * iImpl
TAny * iReserved

Constructor & Destructor Documentation

CDevTTS()

CDevTTS ( ) [private]

C++ default constructor.

CDevTTS(const CDevTTS &)

CDevTTS ( const CDevTTS & ) [private]

Prohibit copy constructor

Parameters

const CDevTTS &

~CDevTTS()

IMPORT_C ~CDevTTS ( )

Destructor.

Member Functions Documentation

AddStyleL(const TTtsStyle &)

IMPORT_C TTtsStyleID AddStyleL ( const TTtsStyle & aStyle )

Adds a new style to the collection. If equal style exists already, new style is not added. Will leave if an error occurs. Likely errors are: KErrNoMemory, not enough memory to add new style. KErrNotSupported, the style is not supported. KErrArgument, the style contains an imposible value.

Since
2.8

Parameters

const TTtsStyle & aStyle

Balance()

IMPORT_C TInt Balance ( )

Returns the current balance setting.

Since
2.8

BufferProcessed(const TDesC8 &)

IMPORT_C void BufferProcessed ( const TDesC8 & aBuffer )

Notifies that the buffer has been processed. The method is used if output mode of synthesizing is EDevTTSClientMode.

Since
2.8

Parameters

const TDesC8 & aBuffer

ConstructL(MDevTTSObserver &)

void ConstructL ( MDevTTSObserver & aObserver ) [private]

By default Symbian 2nd phase constructor is private.

Parameters

MDevTTSObserver & aObserver

CustomInterface(TUid)

IMPORT_C TAny * CustomInterface ( TUid aInterfaceID )

Request a pointer to the custom interface. Currently not in use.

Since
2.8

Parameters

TUid aInterfaceID

DeleteStyleL(TTtsStyleID)

IMPORT_C void DeleteStyleL ( TTtsStyleID aStyleID )

Deletes style.

Since
2.8

Parameters

TTtsStyleID aStyleID

GetPositionL(TTimeIntervalMicroSeconds &)

IMPORT_C void GetPositionL ( TTimeIntervalMicroSeconds & aTime ) const

Gives current position of synthesizing. The method will leave if an error occurs. Likely errors are: KErrNotReady, no synthesizing is ongoing.

Since
2.8

Parameters

TTimeIntervalMicroSeconds & aTime

GetPositionL(TTtsSegment &, TInt &)

IMPORT_C void GetPositionL ( TTtsSegment & aSegment,
TInt & aWordIndex
) const

Gives current position of synthesizing. The method will leave if an error occurs. Likely errors are: KErrNotReady, no synthesizing is ongoing.

Since
2.8

Parameters

TTtsSegment & aSegment
TInt & aWordIndex

IsLanguageSupported(TLanguage)

IMPORT_C TBool IsLanguageSupported ( TLanguage aLanguage ) const

Tells if language is supported by the TTS engine or not.

Since
2.8

Parameters

TLanguage aLanguage

LanguageIdentificationL(CTtsParsedText &, TInt, RArray< TLanguage > &, RArray< TInt > &)

IMPORT_C void LanguageIdentificationL ( CTtsParsedText & aText,
TInt aNumberOfGuesses,
RArray < TLanguage > & aLanguages,
RArray < TInt > & aScores
)

Calls language identification for a given text.

Since
3.0M

Parameters

CTtsParsedText & aText
TInt aNumberOfGuesses
RArray < TLanguage > & aLanguages
RArray < TInt > & aScores

MaxVolume()

IMPORT_C TInt MaxVolume ( )

Returns maximum volume value.

Since
2.8

NewL(MDevTTSObserver &)

IMPORT_C CDevTTS * NewL ( MDevTTSObserver & aObserver ) [static]

Two-phased constructor.

Parameters

MDevTTSObserver & aObserver

NormalizeAndSegmentTextL(CTtsParsedText &)

IMPORT_C void NormalizeAndSegmentTextL ( CTtsParsedText & aText )

Calls Natural Language Processing (NLP) to normalize and segment text.

Since
3.0M

Parameters

CTtsParsedText & aText

NormalizeTextL(CTtsParsedText &)

IMPORT_C void NormalizeTextL ( CTtsParsedText & aText )

Calls Natural Language Processing (NLP) to normalize text.

Since
3.0M

Parameters

CTtsParsedText & aText

NumberOfStyles()

IMPORT_C TUint16 NumberOfStyles ( ) const

Gives number of styles.

Since
2.8

Pause()

IMPORT_C void Pause ( )
Pauses synthesis process.
Since
2.8

PrimeSynthesisL(MTtsSegmentStream &)

IMPORT_C void PrimeSynthesisL ( MTtsSegmentStream & aStream )

Prepares for synthesis. The method will leave if an error occurs. Likely errors are: KErrInUse, synthesizing is currently ongoing. KErrNoMemory, not enough memory to start synthesis. KErrNotSupport, requested function is not supported.

Since
2.8

Parameters

MTtsSegmentStream & aStream

PrimeSynthesisL(CTtsParsedText &)

IMPORT_C void PrimeSynthesisL ( CTtsParsedText & aText )

Prepares for synthesis. The method will leave if an error occurs. Likely errors are: KErrInUse, synthesizing is currently ongoing. KErrNoMemory, not enough memory to start synthesis. KErrNotSupport, requested function is not supported.

Since
2.8

Parameters

CTtsParsedText & aText

SetAudioOutputL(TInt)

IMPORT_C void SetAudioOutputL ( TInt aAudioOutput )

Sets the audio output routing

Since
3.2

Parameters

TInt aAudioOutput

SetAudioPriority(TInt, TDevTTSAudioPreference)

IMPORT_C void SetAudioPriority ( TInt aPriority,
TDevTTSAudioPreference aPref
)

Sets the priority for audio playback if in EDevTTSSoundDeviceMode.

Since
2.8

Parameters

TInt aPriority
TDevTTSAudioPreference aPref

SetBalance(TInt)

IMPORT_C void SetBalance ( TInt aBalance )

Sets the playback device balance. Affects only when DevTTS is in EDevTTSSoundDeviceMode. Illegal values are neglected.

Since
2.8

Parameters

TInt aBalance

SetPositionL(const TTimeIntervalMicroSeconds &)

IMPORT_C void SetPositionL ( const TTimeIntervalMicroSeconds & aTime )

Sets new position for synthesizing. The method will leave if an error occurs. Likely errors are: KErrNotReady, no synthesizing is ongoing. KErrArgument, position cannot be set.

Since
2.8

Parameters

const TTimeIntervalMicroSeconds & aTime

SetPositionL(const TTtsSegment &, TInt)

IMPORT_C void SetPositionL ( const TTtsSegment & aSegment,
TInt aWordIndex
)

Sets new position for synthesizing. The method will leave if an error occurs. Likely errors are: KErrNotReady, no synthesizing is ongoing. KErrArgument, position cannot be set.

Since
2.8

Parameters

const TTtsSegment & aSegment
TInt aWordIndex

SetVolume(TInt)

IMPORT_C void SetVolume ( TInt aVolume )

Sets the playback device volume. Affects only when DevTTS is in EDevTTSSoundDeviceMode. Range is from 0.. MaxVolume() . Illegal values are neglected.

Since
2.8

Parameters

TInt aVolume

SetVolumeRamp(const TTimeIntervalMicroSeconds &)

IMPORT_C void SetVolumeRamp ( const TTimeIntervalMicroSeconds & aRampDuration )

Sets the volume ramp duration. Start and end volumes must be set with SetVolume() function.

Since
2.8

Parameters

const TTimeIntervalMicroSeconds & aRampDuration

Stop()

IMPORT_C void Stop ( )
Stops synthesizing and releases resources of synthesizing. The method does nothing if already stopped.
Since
2.8

StyleL(TTtsStyleID)

IMPORT_C TTtsStyle & StyleL ( TTtsStyleID aStyleID ) const

Receives style information. The method will leave if an error occurs. Likely errors are: KErrNotFound, style identifier not found.

Since
2.8

Parameters

TTtsStyleID aStyleID

StyleL(TUint16)

IMPORT_C TTtsStyle & StyleL ( TUint16 aIndex ) const

Receives style information. The method will leave if an error occurs. Likely errors are: KErrArgument, index is out of bounds.

Since
2.8

Parameters

TUint16 aIndex

SynthesizeL(TDevTTSOutputMode)

IMPORT_C void SynthesizeL ( TDevTTSOutputMode aOutputMode )

Starts synthesizing the text. The method is asynchronous, as soon as the request has been placed, function call will return. MDevTTSObserver::MdtoEvent will be called when synthesizing finishes. The method will leave if an error occurs. Likely errors are: KErrNoMemory, not enough memory. KErrInUse, synthesizing is currently ongoing

Since
2.8

Parameters

TDevTTSOutputMode aOutputMode

Volume()

IMPORT_C TInt Volume ( )

Returns current playback volume.

Since
2.8

operator=(const CDevTTS &)

CDevTTS & operator= ( const CDevTTS & ) [private]

Prohibit assignment operator

Parameters

const CDevTTS &

Member Data Documentation

CTTSAlgorithmManager * iImpl

CTTSAlgorithmManager * iImpl [private]

TAny * iReserved

TAny * iReserved [private]