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.
#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 > &, ErrorInfo > | ErrorSpeaking |
|
virtual |
| 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.
| void CYISpeechSynthesizer::StopSpeaking | ( | ) |
Stops current speech output and cause the queue to be cleared.
Signals that the output of an CYISpeechSynthesizer::Utterance to the audio device has resulted in an error.
Signals that an CYISpeechSynthesizer::Utterance has either finished audio output or has been cancelled partway.
Signals that an Utterance is being output as speech to the audio device.