You.i Engine
CYISpeechSynthesizer Class Reference

Detailed Description

Provides text-to-speech functionality using the underlying platform's technology.

The CYISpeechSynthesizer takes an Utterance object as input and converts associated text to audible speech on the output device.

See also
CYIFramework::GetSpeechSynthesizer

#include <audio/YiSpeechSynthesizer.h>

Classes

struct  ErrorInfo
 Provides specific information about an error encountered when sending an CYISpeechSynthesizer::Utterance to the audio device. More...
 
class  Utterance
 Provides information about a specific phrase of text that can be used to send speech to the audio device using CYISpeechSynthesizer. More...
 

Public Member Functions

virtual ~CYISpeechSynthesizer ()
 
void Speak (const std::shared_ptr< Utterance > &pUtterance, bool bSpeakImmediately=false)
 
void StopSpeaking ()
 
bool IsSpeaking () const
 

Public Attributes

CYISignal< const std::shared_ptr< Utterance > & > StartedSpeaking
 
CYISignal< const std::shared_ptr< Utterance > &, bool > FinishedSpeaking
 
CYISignal< const std::shared_ptr< Utterance > &, ErrorInfoErrorSpeaking
 

Constructor & Destructor Documentation

virtual CYISpeechSynthesizer::~CYISpeechSynthesizer ( )
virtual

Member Function Documentation

bool CYISpeechSynthesizer::IsSpeaking ( ) const

Returns true if currently outputting speech to the audio device.

void CYISpeechSynthesizer::Speak ( const std::shared_ptr< Utterance > &  pUtterance,
bool  bSpeakImmediately = false 
)

Sends a specific Utterance as speech to the device's audio output.

Note
The Utterance will be added to the end of the queue for spoken output unless bSpeakImmediately is true, which will stop current speech output and cause the queue to be cleared.
See also
CYISpeechSynthesizer::Utterance
void CYISpeechSynthesizer::StopSpeaking ( )

Stops current speech output and cause the queue to be cleared.

Member Data Documentation

CYISignal<const std::shared_ptr<Utterance> &, ErrorInfo> CYISpeechSynthesizer::ErrorSpeaking

Signals that the output of an CYISpeechSynthesizer::Utterance to the audio device has resulted in an error.

See also
CYISpeechSynthesizer::Utterance
CYISpeechSynthesizer::ErrorInfo
CYISignal<const std::shared_ptr<Utterance> &, bool > CYISpeechSynthesizer::FinishedSpeaking

Signals that an CYISpeechSynthesizer::Utterance has either finished audio output or has been cancelled partway.

See also
CYISpeechSynthesizer::Utterance
CYISignal<const std::shared_ptr<Utterance> &> CYISpeechSynthesizer::StartedSpeaking

Signals that an Utterance is being output as speech to the audio device.

See also
CYISpeechSynthesizer::Utterance

The documentation for this class was generated from the following file: