class CTTSAlgorithmManager : public CBase |
CTTSAlgorithmManager contains implementations behind DevTTS interface. Observer callbacks from TtsHwDevice and DevTTSAudio
NssDevTts.lib
Private Member Functions | |
---|---|
CTTSAlgorithmManager ( MDevTTSObserver &) | |
CTTSAlgorithmManager (const CTTSAlgorithmManager &) | |
void | CheckStateL () |
void | ConstructL () |
CTTSAlgorithmManager & | operator= (const CTTSAlgorithmManager &) |
Private Member Enumerations | |
---|---|
enum | TDevTTSState { EDevTTSNotInitialized = 0, EDevTTSStopped , EDevTTSPrimed , EDevTTSSynthesizing } |
enum |
TTTSAudioPlayerState
{
ETTSAudioPlayerNotInitialized = 0, ETTSAudioPlayerInitializing , ETTSAudioPlayerIdle , ETTSAudioPlayerPlaying , ETTSAudioPlayerRecording , ETTSAudioPlayerPaused , ETTSAudioPlayerError } |
Private Attributes | |
---|---|
CDevTTSAudio * | iAudio |
TTTSAudioPlayerState | iAudioState |
CActiveSchedulerWait | iAudioWait |
TInt | iError |
CTtsHwDevice * | iHw |
TBool | iLastBufferFromTts |
TDevTTSOutputMode | iMode |
CNlpHwDevice * | iNlp |
TBool | iNlpInitialized |
MDevTTSObserver & | iObserver |
TBool | iPaused |
TPtrC8 | iPlaybackBuffer |
TInt | iStartPoint |
TDevTTSState | iState |
TInt | iStopPoint |
CASRSTtpHwDevice * | iTtpHw |
CTTSAlgorithmManager | ( | MDevTTSObserver & | aObserver | ) | [private] |
C++ default constructor.
MDevTTSObserver & aObserver |
CTTSAlgorithmManager | ( | const CTTSAlgorithmManager & | ) | [private] |
const CTTSAlgorithmManager & |
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.
const TTtsStyle & aStyle |
void | BufferProcessed | ( | const TDesC8 & | aBuffer | ) |
Notifies that the buffer has been processed. The method is used if output mode of synthesizing is EDevTTSClientMode.
const TDesC8 & aBuffer |
TAny * | CustomInterface | ( | TUid | aInterfaceID | ) |
Request a pointer to the custom interface. Currently not in use.
TUid aInterfaceID |
void | DeleteStyleL | ( | TTtsStyleID | aStyleID | ) |
Deletes style.
TTtsStyleID aStyleID |
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.
TTimeIntervalMicroSeconds & aTime |
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.
TTtsSegment & aSegment | |
TInt & aWordIndex |
TBool | IsLanguageSupported | ( | TLanguage | aLanguage | ) | const |
Tells if language is supported by the TTS engine or not.
TLanguage aLanguage |
void | LanguageIdentificationL | ( | CTtsParsedText & | aText, |
TInt | aNumberOfGuesses, | |||
RArray < TLanguage > & | aLanguages, | |||
RArray < TInt > & | aScores | |||
) |
Calls language identification for a given text.
CTtsParsedText & aText | |
TInt aNumberOfGuesses | |
RArray < TLanguage > & aLanguages | |
RArray < TInt > & aScores |
HBufC8 * | MathdoConfigurationData | ( | TUint32 | aPackageType, |
TUint32 | aPackageID, | |||
TUint32 | aStartPosition, | |||
TUint32 | aEndPosition | |||
) |
From MASRSTtpHwDeviceObserver::MathdoConfigurationData
Callback function to load configuration data. Client provides an implementation.
void | MathdoWordListReady | ( | const TInt | aError | ) |
From MASRSTtpHwDeviceObserver::MathdoWordListReady
Callback function to notify that word list is converted. Client provides an implementation.
const TInt aError |
void | MdtaoBufferToBeFilled | ( | TDes8 & | aBuffer, |
TInt | aSizeRequested | |||
) |
From MDevTTSAudioObserver::BufferToBeFilled
void | MdtaoInitializeComplete | ( | TInt | aError | ) |
From MDevTTSAudioObserver::InitializeComplete
TInt aError |
void | MdtaoPlayFinished | ( | TInt | aError | ) |
From MDevTTSAudioObserver::PlayFinished
TInt aError |
HBufC8 * | MnhdoConfigurationData | ( | TUint32 | aPackageType, |
TUint32 | aPackageID, | |||
TUint32 | aStartPosition, | |||
TUint32 | aEndPosition | |||
) |
From MNlpHwDeviceObserver::MnhdoConfigurationData
Invoked by TTS HW Device when it needs a configuration data package.
void | MnhdoNlpCompleted | ( | TInt | aStatus | ) |
From MNlpHwDeviceObserver::MnhdNlpCompleted
Called by the HW device when the synthesis has been completed.
TInt aStatus | Error code, KErrNone if success |
const TTtsStyle & | MnhdoStyleL | ( | TTtsStyleID | styleID | ) |
From MNlpHwDeviceObserver::MnhdCustomEvent
Returns style given the style id.
TTtsStyleID styleID |
void | MthdCustomEvent | ( | TInt | aEvent, |
TInt | aStatus, | |||
const TDesC8 & | aParameter = KNullDesC8 | |||
) |
From MTtsHwDeviceObserver::MthdCustomEvent
Called by the HW device when custom command implementation wants to notify a client.
TInt aEvent | |
TInt aStatus | |
const TDesC8 & aParameter = KNullDesC8 |
void | MthdProcessBuffer | ( | const TDesC8 & | aBuffer | ) |
From MTtsHwDeviceObserver::MthdProcessBuffer
Called by the HW device when the HW device has synthesized a new audio buffer.
const TDesC8 & aBuffer |
void | MthdTtsCompleted | ( | TInt | aStatus | ) |
From MTtsHwDeviceObserver::MthdTtsCompleted
Called by the HW device when the synthesis has been completed.
TInt aStatus |
HBufC8 * | MthdoConfigurationData | ( | TUint32 | aPackageType, |
TUint32 | aPackageID, | |||
TUint32 | aStartPosition, | |||
TUint32 | aEndPosition | |||
) |
From MTtsHwDeviceObserver::MthdoConfigurationData
Invoked by TTS HW Device when it needs a configuration data package.
CTTSAlgorithmManager * | NewL | ( | MDevTTSObserver & | aObserver | ) | [static] |
Two-phased constructor.
MDevTTSObserver & aObserver |
void | NormalizeAndSegmentTextL | ( | CTtsParsedText & | aText | ) |
Calls Natural Language Processing (NLP) to normalize and segment text.
CTtsParsedText & aText |
void | NormalizeTextL | ( | CTtsParsedText & | aText | ) |
Calls Natural Language Processing (NLP) to normalize text.
CTtsParsedText & aText |
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.
MTtsSegmentStream & aStream |
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.
CTtsParsedText & aText |
void | SetAudioOutputL | ( | TInt | aAudioOutput | ) |
Sets the audio output routing
TInt aAudioOutput |
void | SetAudioPriority | ( | TInt | aPriority, |
TDevTTSAudioPreference | aPref | |||
) |
Sets the priority for audio playback if in EDevTTSSoundDeviceMode.
TInt aPriority | |
TDevTTSAudioPreference aPref |
void | SetBalance | ( | TInt | aBalance | ) |
Sets the playback device balance. Affects only when DevTTS is in EDevTTSSoundDeviceMode. Illegal values are neglected.
TInt aBalance |
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.
const TTimeIntervalMicroSeconds & aTime |
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.
const TTtsSegment & aSegment | |
TInt aWordIndex |
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.
TInt aVolume |
void | SetVolumeRamp | ( | const TTimeIntervalMicroSeconds & | aRampDuration | ) |
Sets the volume ramp duration. Start and end volumes must be set with SetVolume() function.
const TTimeIntervalMicroSeconds & aRampDuration |
void | Stop | ( | ) |
Stops synthesizing and releases resources of synthesizing. The method does nothing if already stopped.
TTtsStyle & | StyleL | ( | TTtsStyleID | aStyleID | ) | const |
Receives style information. The method will leave if an error occurs. Likely errors are: KErrNotFound, style identifier not found.
TTtsStyleID aStyleID |
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.
TUint16 aIndex |
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
TDevTTSOutputMode aOutputMode |
CTTSAlgorithmManager & | operator= | ( | const CTTSAlgorithmManager & | ) | [private] |
const CTTSAlgorithmManager & |
EDevTTSNotInitialized = 0 | |
EDevTTSStopped | |
EDevTTSPrimed | |
EDevTTSSynthesizing |
ETTSAudioPlayerNotInitialized = 0 | |
ETTSAudioPlayerInitializing | |
ETTSAudioPlayerIdle | |
ETTSAudioPlayerPlaying | |
ETTSAudioPlayerRecording | |
ETTSAudioPlayerPaused | |
ETTSAudioPlayerError |
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.