From 4cdb5ed1f35d1c9a8f066de97e359828e40d3e63 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Wed, 7 May 2014 17:08:02 +0200 Subject: [PATCH] AtisSpeaker: prepare for individual voices --- src/Instrumentation/commradio.cxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Instrumentation/commradio.cxx b/src/Instrumentation/commradio.cxx index dd36acaa4..5555d47e0 100644 --- a/src/Instrumentation/commradio.cxx +++ b/src/Instrumentation/commradio.cxx @@ -75,13 +75,27 @@ public: _stationId = stationId; } + void setVoice(const string & voice) + { + _voice = voice; + } + + const string & getVoice() const + { + return _voice; + } + private: SynthesizeRequest _synthesizeRequest; SGLockedQueue > _spokenAtis; string _stationId; + string _voice; }; AtisSpeaker::AtisSpeaker() + : + _voice("/ATC/cmu_us_arctic_slt.htsvoice") +// _voice("/ATC/cstr_uk_female-1.0.htsvoice") { _synthesizeRequest.listener = this; } @@ -115,7 +129,7 @@ void AtisSpeaker::valueChanged(SGPropertyNode * node) FGSoundManager * smgr = dynamic_cast(globals->get_soundmgr()); assert(smgr != NULL); - string voice = globals->get_fg_root() + "/ATC/cmu_us_arctic_slt.htsvoice"; + string voice = globals->get_fg_root() + _voice; FLITEVoiceSynthesizer * synthesizer = dynamic_cast(smgr->getSynthesizer(voice)); synthesizer->synthesize(_synthesizeRequest);