diff options
Diffstat (limited to 'backends/text-to-speech')
-rw-r--r-- | backends/text-to-speech/linux/linux-text-to-speech.cpp | 4 | ||||
-rw-r--r-- | backends/text-to-speech/windows/windows-text-to-speech.cpp | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/backends/text-to-speech/linux/linux-text-to-speech.cpp b/backends/text-to-speech/linux/linux-text-to-speech.cpp index ccedb6bf6b..5943b69f49 100644 --- a/backends/text-to-speech/linux/linux-text-to-speech.cpp +++ b/backends/text-to-speech/linux/linux-text-to-speech.cpp @@ -330,8 +330,8 @@ void SpeechDispatcherManager::setVolume(unsigned volume) { void SpeechDispatcherManager::setLanguage(Common::String language) { if (_speechState == BROKEN) return; - spd_set_language(_connection, language.c_str()); - _ttsState->_language = language; + Common::TextToSpeechManager::setLanguage(language); + spd_set_language(_connection, _ttsState->_language.c_str()); setVoice(_ttsState->_activeVoice); } diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp index 0e794d7baa..2b405f5553 100644 --- a/backends/text-to-speech/windows/windows-text-to-speech.cpp +++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp @@ -338,9 +338,7 @@ void WindowsTextToSpeechManager::setVolume(unsigned volume) { } void WindowsTextToSpeechManager::setLanguage(Common::String language) { - if (language == "C") - language = "en"; - _ttsState->_language = language; + Common::TextToSpeechManager::setLanguage(language); updateVoices(); setVoice(0); } @@ -471,7 +469,7 @@ void WindowsTextToSpeechManager::updateVoices() { if (_ttsState->_availableVoices.empty()) { _speechState = NO_VOICE; - warning("No voice is available"); + warning("No voice is available for language: %s", _ttsState->_language.c_str()); } else if (_speechState == NO_VOICE) _speechState = READY; } |