22 #ifndef BACKENDS_TEXT_TO_SPEECH_ABSTRACT_H 23 #define BACKENDS_TEXT_TO_SPEECH_ABSTRACT_H 25 #include "common/scummsys.h" 26 #include "common/str.h" 28 #include "common/array.h" 178 virtual bool say(
const U32String &str, Action action) {
return false; }
184 bool say(
const String &str, Action action, CodePage charset = kUtf8) {
186 return say(textToSpeak, action);
204 return say(str, INTERRUPT_NO_REPEAT, charset);
210 virtual bool stop() {
return false; }
215 virtual bool pause() {
return false; }
258 virtual void setRate(
int rate) { _ttsState->_rate = rate; }
270 virtual void setPitch(
int pitch) { _ttsState->_pitch = pitch; }
282 virtual void setVolume(
unsigned volume) { _ttsState->_volume = volume; }
298 virtual void setLanguage(
String language);
318 Array<int> getVoiceIndicesByGender (TTSVoice::Gender gender);
343 void enable(
bool on);
349 virtual void updateVoices() {};
356 #endif // BACKENDS_TEXT_TO_SPEECH_ABSTRACT_H Age getAge()
Definition: text-to-speech.h:95
void setAge(Age age)
Definition: text-to-speech.h:101
void * _data
Pointer to tts engine specific data about the voice.
Definition: text-to-speech.h:126
virtual void setRate(int rate)
Definition: text-to-speech.h:258
virtual bool stop()
Definition: text-to-speech.h:210
String getDescription()
Definition: text-to-speech.h:121
virtual void setVoice(unsigned index)
Definition: text-to-speech.h:246
Array< TTSVoice > getVoicesArray()
Definition: text-to-speech.h:308
int * _refCount
Reference count (serves for proper feeing of _data)
Definition: text-to-speech.h:128
int getPitch()
Definition: text-to-speech.h:275
Definition: text-to-speech.h:44
virtual void freeVoiceData(void *data)
Definition: text-to-speech.h:338
int getVolume()
Definition: text-to-speech.h:287
virtual bool isSpeaking()
Definition: text-to-speech.h:229
bool say(const U32String &str)
Definition: text-to-speech.h:194
virtual void setVolume(unsigned volume)
Definition: text-to-speech.h:282
virtual bool say(const U32String &str, Action action)
Definition: text-to-speech.h:178
virtual void setPitch(int pitch)
Definition: text-to-speech.h:270
String getLanguage()
Definition: text-to-speech.h:303
virtual bool isReady()
Definition: text-to-speech.h:239
void * getData()
Definition: text-to-speech.h:109
Gender _gender
Gender of the voice.
Definition: text-to-speech.h:121
Definition: algorithm.h:29
virtual bool pause()
Definition: text-to-speech.h:215
virtual int getDefaultVoice()
Definition: text-to-speech.h:323
Definition: text-to-speech.h:145
virtual bool resume()
Definition: text-to-speech.h:224
Gender getGender()
Definition: text-to-speech.h:79
void setData(void *data)
Definition: text-to-speech.h:115
String _description
Description of the voice (gets displayed in GUI)
Definition: text-to-speech.h:127
int getRate()
Definition: text-to-speech.h:263
virtual bool isPaused()
Definition: text-to-speech.h:234
bool say(const String &str, Action action, CodePage charset=kUtf8)
Definition: text-to-speech.h:184
void setGender(Gender gender)
Definition: text-to-speech.h:85
Definition: text-to-speech.h:131
bool say(const String &str, CodePage charset=kUtf8)
Definition: text-to-speech.h:203
Age _age
Age of the voice.
Definition: text-to-speech.h:125