|
virtual void | addToConfig (ArConfig *config) |
| Use the given ArConfig object to read parameters such as voice, speaking rate, volume.
|
|
| ArSpeechSynth () |
| Don't forget to call this from derived classes. More...
|
|
virtual int | getAudioSampleRate ()=0 |
|
virtual const char * | getCurrentVoiceName ()=0 |
| Get name of current voice, if set with setVoice (else returns NULL)
|
|
ArRetFunctorC< bool, ArSpeechSynth > * | getInitCallback () |
|
ArFunctorC< ArSpeechSynth > * | getInterruptCallback () |
|
ArRetFunctor2C< bool, ArSpeechSynth, const char *, const char * > * | getSpeakCallback (void) |
|
virtual std::list< std::string > | getVoiceNames ()=0 |
| Return a list of available voice names, if possible. More...
|
|
virtual bool | init () |
| Perform synthesizer initialization, if necessary. More...
|
|
virtual void | interrupt ()=0 |
| If any speech is currently ongoing, interrupt it.
|
|
virtual void | lock () |
| Lock, if neccesary.
|
|
void | setAudioCallback (ArRetFunctor2< bool, ArTypes::Byte2 *, int > *cb) |
| Instead of playing synthesized audio using the synthesizer's internal audio playback, call the given callback when a chunk of audio has been synthesized. More...
|
|
virtual void | setAudioSampleRate (int rate)=0 |
| Change audio sample rate (Hz). More...
|
|
virtual bool | setVoice (const char *name)=0 |
| Set the current voice by name. More...
|
|
virtual bool | speak (const char *str, const char *voiceParams, ArRetFunctor2< bool, ArTypes::Byte2 *, int > *audioOutputCB, unsigned short sampleRate=0)=0 |
| Speaks the given text. More...
|
|
virtual bool | speak (const char *str, const char *voiceParams=NULL) |
| Speaks the given text. More...
|
|
virtual bool | speakf (const char *fmt,...)=0 |
| Speaks the given string, using current voice and output settings, taking varargs and a format string (like printf)
|
|
virtual void | unlock () |
| Unlock, if neccesary.
|
|
Abstract interface to speech synthesis.
This class defines the abstract interface for speech synthesizers used with Aria. Implementations are provided in the separate ArSpeechSynth_Cepstral and ArSpeechSynth_Festival libraries. This class provides a common-denominator interface. Implementations (especially ArCepstral) may support more features, or behave differently; refer to their documentation for more information.
This class registers one parameter with the global ArConfig object in the "Speech Synthesis" section: The parameter is named "voice" and sets the voice used for speech synthesis, if multiple voices is supported and the new voice can be loaded.