diff options
author | neuromancer | 2019-12-21 11:49:13 -0300 |
---|---|---|
committer | Filippos Karapetis | 2019-12-21 16:49:13 +0200 |
commit | bd92f2d00aa8630d896b2a02e0adb23ce22dfe3e (patch) | |
tree | 080021b6de1b14715029834633e74a89fbef33ad /engines/sherlock/talk.cpp | |
parent | e7ff394f3302f493e50f2fa5a2a906fd1915a275 (diff) | |
download | scummvm-rg350-bd92f2d00aa8630d896b2a02e0adb23ce22dfe3e.tar.gz scummvm-rg350-bd92f2d00aa8630d896b2a02e0adb23ce22dfe3e.tar.bz2 scummvm-rg350-bd92f2d00aa8630d896b2a02e0adb23ce22dfe3e.zip |
SHERLOCK: Enable the use of TTS to read descriptions as a "narrator" for The Case of Serrated Scalpel
Diffstat (limited to 'engines/sherlock/talk.cpp')
-rw-r--r-- | engines/sherlock/talk.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index b4987f070a..ec20f807df 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -33,6 +33,11 @@ #include "sherlock/tattoo/tattoo_scene.h" #include "sherlock/tattoo/tattoo_talk.h" #include "sherlock/tattoo/tattoo_user_interface.h" +#include "common/config-manager.h" + +#ifdef USE_TTS +#include "common/text-to-speech.h" +#endif namespace Sherlock { @@ -351,6 +356,15 @@ void Talk::talkTo(const Common::String filename) { // Make a copy of the statement (in case the script frees the statement list), and then execute it Statement statement = _statements[select]; + + #ifdef USE_TTS + if (_talkTo == -1 && ConfMan.getBool("tts_narrator")) { + Common::TextToSpeechManager *_ttsMan = g_system->getTextToSpeechManager(); + _ttsMan->stop(); + _ttsMan->say(_statements[select]._reply.c_str()); + } + #endif + doScript(_statements[select]._reply); if (IS_ROSE_TATTOO) { |