CTtsHwDevice Class Reference

class CTtsHwDevice : public CASRSHwDevice

Class to provide speech synthesis

asrsttshwdevice.lib
Since
2.8

Inherits from

Public Member Functions
~CTtsHwDevice ()
IMPORT_C TTtsStyleID AddStyleL (const TTtsStyle &)
IMPORT_C void AnalyzeProsodyL ( CTtsParsedText &)
IMPORT_C void AnalyzeStructureL ( CTtsParsedText &)
IMPORT_C void BufferProcessed (const TDesC8 &)
IMPORT_C void DeleteStyleL ( TTtsStyleID )
IMPORT_C void GetPositionL ( TTimeIntervalMicroSeconds &)
IMPORT_C void GetPositionL ( TTtsSegment &, TInt &)
IMPORT_C TBool IsLanguageSupported ( TLanguage )
IMPORT_C CTtsHwDevice * NewL ( MTtsHwDeviceObserver &, TUint , TUint )
IMPORT_C TUint16 NumberOfStyles ()
IMPORT_C void Pause ()
IMPORT_C void PrimeSynthesisL ( MTtsSegmentStream &)
IMPORT_C void PrimeSynthesisL ( CTtsParsedText &)
IMPORT_C void SetPositionL (const TTimeIntervalMicroSeconds &)
IMPORT_C void SetPositionL (const TTtsSegment &, TInt )
IMPORT_C void Stop ()
IMPORT_C TTtsStyle & StyleL ( TTtsStyleID )
IMPORT_C TTtsStyle & StyleL ( TUint16 )
IMPORT_C void SynthesizeL ()
Private Member Functions
CTtsHwDevice ()
void ConstructL ( MTtsHwDeviceObserver &, TUint , TUint )
Inherited Functions
CASRSHwDevice::CASRSHwDevice()
CASRSHwDevice::Clear()
CASRSHwDevice::CustomInterface(TUid)
CASRSHwDevice::InitializeL()
CASRSHwDevice::NewL()
CASRSHwDevice::~CASRSHwDevice()
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
CTtsAlgorithm * iAlgorithm
TAny * iReserved

Constructor & Destructor Documentation

CTtsHwDevice()

CTtsHwDevice ( ) [private]

C++ default constructor.

~CTtsHwDevice()

IMPORT_C ~CTtsHwDevice ( ) [virtual]

Destructor.

Member Functions Documentation

AddStyleL(const TTtsStyle &)

IMPORT_C TTtsStyleID AddStyleL ( const TTtsStyle & aStyle )
Adds new style to the collection. If equal style exists already, new style is not added.
Since
2.8

Parameters

const TTtsStyle & aStyle Style to be added.

AnalyzeProsodyL(CTtsParsedText &)

IMPORT_C void AnalyzeProsodyL ( CTtsParsedText & aText )
Analyses stucture of text and adds style information.
Since
2.8

Parameters

CTtsParsedText & aText Updates text object by dividing it into segments with new styles.

AnalyzeStructureL(CTtsParsedText &)

IMPORT_C void AnalyzeStructureL ( CTtsParsedText & aText )
Analyses stucture of text by finding paragraphs and sentences.
Since
2.8

Parameters

CTtsParsedText & aText Updates text object by segmenting it into paragraphs and sentences.

BufferProcessed(const TDesC8 &)

IMPORT_C void BufferProcessed ( const TDesC8 & aBuffer )
Notifies that the buffer has been processed
Since
2.8

Parameters

const TDesC8 & aBuffer The buffer which has been processed

ConstructL(MTtsHwDeviceObserver &, TUint, TUint)

void ConstructL ( MTtsHwDeviceObserver & aObserver,
TUint aSamplingRate,
TUint aBufferSize
) [private]

By default Symbian 2nd phase constructor is private.

Parameters

MTtsHwDeviceObserver & aObserver
TUint aSamplingRate
TUint aBufferSize

DeleteStyleL(TTtsStyleID)

IMPORT_C void DeleteStyleL ( TTtsStyleID aStyleID )
Deletes style.
Since
2.8

Parameters

TTtsStyleID aStyleID Identifier of style to be deleted.

GetPositionL(TTimeIntervalMicroSeconds &)

IMPORT_C void GetPositionL ( TTimeIntervalMicroSeconds & aTime )
Gives current position of synthesizing.
Since
2.8

Parameters

TTimeIntervalMicroSeconds & aTime Time of the synthesizing position.

GetPositionL(TTtsSegment &, TInt &)

IMPORT_C void GetPositionL ( TTtsSegment & aSegment,
TInt & aWordIndex
)
Gives current position of synthesizing.
Since
2.8

Parameters

TTtsSegment & aSegment The segment being synthesizing
TInt & aWordIndex The index of word being synthesizing

IsLanguageSupported(TLanguage)

IMPORT_C TBool IsLanguageSupported ( TLanguage aLanguage )
Ask if a language is supported or not.
Since
2.8

Parameters

TLanguage aLanguage Synthesizing language.

NewL(MTtsHwDeviceObserver &, TUint, TUint)

IMPORT_C CTtsHwDevice * NewL ( MTtsHwDeviceObserver & aObserver,
TUint aSamplingRate,
TUint aBufferSize
) [static]

Two-phased constructor.

Parameters

MTtsHwDeviceObserver & aObserver Observer which implements callback functions.
TUint aSamplingRate Sampling rate for output audio
TUint aBufferSize Buffer size for output audio

NumberOfStyles()

IMPORT_C TUint16 NumberOfStyles ( ) const
Gives number of styles.
Since
2.8

Pause()

IMPORT_C void Pause ( )
Pauses synthesizing.
Since
2.8

PrimeSynthesisL(MTtsSegmentStream &)

IMPORT_C void PrimeSynthesisL ( MTtsSegmentStream & aStream )
Prepares for synthesizing.
Since
2.8

Parameters

MTtsSegmentStream & aStream Stream to be synthesized.

PrimeSynthesisL(CTtsParsedText &)

IMPORT_C void PrimeSynthesisL ( CTtsParsedText & aText )
Prepares for synthesizing.
Since
2.8

Parameters

CTtsParsedText & aText Text containing segments to be synthesized.

SetPositionL(const TTimeIntervalMicroSeconds &)

IMPORT_C void SetPositionL ( const TTimeIntervalMicroSeconds & aTime )
Sets new position for synthesizing.
Since
2.8

Parameters

const TTimeIntervalMicroSeconds & aTime Time of the synthesizing postion.

SetPositionL(const TTtsSegment &, TInt)

IMPORT_C void SetPositionL ( const TTtsSegment & aSegment,
TInt aWordIndex
)
Sets new position for synthesizing.
Since
2.8

Parameters

const TTtsSegment & aSegment The segment being synthesizing
TInt aWordIndex The index of word being synthesizing

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 )
Receives style information
Since
2.8

Parameters

TTtsStyleID aStyleID Style identifier

StyleL(TUint16)

IMPORT_C TTtsStyle & StyleL ( TUint16 aIndex )
Receives style information
Since
2.8

Parameters

TUint16 aIndex Index to style: 0..NumberOfStyles()

SynthesizeL()

IMPORT_C void SynthesizeL ( )
Starts waveform production. The synthesized audio buffers are send back to client using MthdProcessBuffer().
Since
2.8

Member Data Documentation

CTtsAlgorithm * iAlgorithm

CTtsAlgorithm * iAlgorithm [private]

TAny * iReserved

TAny * iReserved [private]