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" 183 virtual bool say(
const U32String &str, Action action) {
return false; }
189 bool say(
const String &str, Action action, CodePage charset = kUtf8) {
191 return say(textToSpeak, action);
209 return say(str, INTERRUPT_NO_REPEAT, charset);
215 virtual bool stop() {
return false; }
220 virtual bool pause() {
return false; }
263 virtual void setRate(
int rate) { _ttsState->_rate = rate; }
275 virtual void setPitch(
int pitch) { _ttsState->_pitch = pitch; }
287 virtual void setVolume(
unsigned volume) { _ttsState->_volume = volume; }
303 virtual void setLanguage(
String language);
323 Array<int> getVoiceIndicesByGender (TTSVoice::Gender gender);
348 void enable(
bool on);
354 virtual void updateVoices() {};
361 #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:131
virtual void setRate(int rate)
Definition: text-to-speech.h:263
virtual bool stop()
Definition: text-to-speech.h:215
String getDescription()
Definition: text-to-speech.h:121
virtual void setVoice(unsigned index)
Definition: text-to-speech.h:251
Array< TTSVoice > getVoicesArray()
Definition: text-to-speech.h:313
int * _refCount
Reference count (serves for proper feeing of _data)
Definition: text-to-speech.h:133
void setDescription(String description)
Definition: text-to-speech.h:126
int getPitch()
Definition: text-to-speech.h:280
Definition: text-to-speech.h:44
virtual void freeVoiceData(void *data)
Definition: text-to-speech.h:343
int getVolume()
Definition: text-to-speech.h:292
virtual bool isSpeaking()
Definition: text-to-speech.h:234
bool say(const U32String &str)
Definition: text-to-speech.h:199
virtual void setVolume(unsigned volume)
Definition: text-to-speech.h:287
virtual bool say(const U32String &str, Action action)
Definition: text-to-speech.h:183
virtual void setPitch(int pitch)
Definition: text-to-speech.h:275
String getLanguage()
Definition: text-to-speech.h:308
virtual bool isReady()
Definition: text-to-speech.h:244
void * getData()
Definition: text-to-speech.h:109
Gender _gender
Gender of the voice.
Definition: text-to-speech.h:126
Definition: algorithm.h:29
virtual bool pause()
Definition: text-to-speech.h:220
virtual int getDefaultVoice()
Definition: text-to-speech.h:328
Definition: text-to-speech.h:150
virtual bool resume()
Definition: text-to-speech.h:229
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:132
int getRate()
Definition: text-to-speech.h:268
virtual bool isPaused()
Definition: text-to-speech.h:239
bool say(const String &str, Action action, CodePage charset=kUtf8)
Definition: text-to-speech.h:189
void setGender(Gender gender)
Definition: text-to-speech.h:85
Definition: text-to-speech.h:136
bool say(const String &str, CodePage charset=kUtf8)
Definition: text-to-speech.h:208
Age _age
Age of the voice.
Definition: text-to-speech.h:130