diff options
author | Jaromir Wysoglad | 2019-07-18 13:34:22 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-09-01 22:47:55 +0300 |
commit | 5c1f562452e201a968063e176b55fc14d912aea1 (patch) | |
tree | 67d7d4bbabe1bc18f5aea429bb27cd511e1088cb /backends/text-to-speech/windows | |
parent | 4d9572073192a3cefe7b148a27197c2ca9f60087 (diff) | |
download | scummvm-rg350-5c1f562452e201a968063e176b55fc14d912aea1.tar.gz scummvm-rg350-5c1f562452e201a968063e176b55fc14d912aea1.tar.bz2 scummvm-rg350-5c1f562452e201a968063e176b55fc14d912aea1.zip |
TTS: Implement conversion to UTF-8 in say on linux
Diffstat (limited to 'backends/text-to-speech/windows')
-rw-r--r-- | backends/text-to-speech/windows/windows-text-to-speech.cpp | 10 | ||||
-rw-r--r-- | backends/text-to-speech/windows/windows-text-to-speech.h | 2 |
2 files changed, 10 insertions, 2 deletions
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 e9f28d966b..32087f5ccb 100644 --- a/backends/text-to-speech/windows/windows-text-to-speech.cpp +++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp @@ -91,11 +91,19 @@ WindowsTextToSpeechManager::~WindowsTextToSpeechManager() { ::CoUninitialize(); } -bool WindowsTextToSpeechManager::say(Common::String str) { +bool WindowsTextToSpeechManager::say(Common::String str, Common::String charset) { if(_speechState == BROKEN || _speechState == NO_VOICE) { warning("The tts cannot speak in this state"); return true; } + + if (charset == "") { +#ifdef USE_TRANSLATION + charset = TransMan.getCurrentCharset(); +#else + charset = "ASCII"; +#endif + } if (isPaused()) { resume(); } diff --git a/backends/text-to-speech/windows/windows-text-to-speech.h b/backends/text-to-speech/windows/windows-text-to-speech.h index 2ae062ce92..848ae854eb 100644 --- a/backends/text-to-speech/windows/windows-text-to-speech.h +++ b/backends/text-to-speech/windows/windows-text-to-speech.h @@ -43,7 +43,7 @@ public: WindowsTextToSpeechManager(); virtual ~WindowsTextToSpeechManager(); - virtual bool say(Common::String str); + virtual bool say(Common::String str, Common::String charset = ""); virtual bool stop(); virtual bool pause(); |