aboutsummaryrefslogtreecommitdiff
path: root/backends/text-to-speech/windows/windows-text-to-speech.cpp
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-07-18 13:34:22 +0200
committerFilippos Karapetis2019-09-01 22:47:55 +0300
commit5c1f562452e201a968063e176b55fc14d912aea1 (patch)
tree67d7d4bbabe1bc18f5aea429bb27cd511e1088cb /backends/text-to-speech/windows/windows-text-to-speech.cpp
parent4d9572073192a3cefe7b148a27197c2ca9f60087 (diff)
downloadscummvm-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/windows-text-to-speech.cpp')
-rw-r--r--backends/text-to-speech/windows/windows-text-to-speech.cpp10
1 files changed, 9 insertions, 1 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();
}