diff --git a/src/Audio/AudioOutput.cc b/src/Audio/AudioOutput.cc index 5f48d8f85ad517b402a8492ed5c86744eafdc293..4c892b5da416becdf47ffd09aa8bae77791b1d96 100644 --- a/src/Audio/AudioOutput.cc +++ b/src/Audio/AudioOutput.cc @@ -20,14 +20,12 @@ AudioOutput::AudioOutput(QGCApplication* app, QGCToolbox* toolbox) : QGCTool(app, toolbox) , _tts(new QTextToSpeech(this)) { - _tts->setLocale(QLocale::system()); + //-- Force TTS engine to English as all incoming messages from the autopilot + // are in English and not localized. +#ifdef Q_OS_LINUX + _tts->setLocale(QLocale("en_US")); +#endif connect(_tts, &QTextToSpeech::stateChanged, this, &AudioOutput::_stateChanged); - connect(qgcApp(), &QGCApplication::languageChanged, this, &AudioOutput::_languageChanged); -} - -void AudioOutput::_languageChanged(const QLocale locale) -{ - _tts->setLocale(locale); } bool AudioOutput::say(const QString& inText) diff --git a/src/Audio/AudioOutput.h b/src/Audio/AudioOutput.h index d3e0a34db108c4ae04938d8c7d4b38e650c1875e..b97d81f4e996581f518c3dae0083282e82f3c92d 100644 --- a/src/Audio/AudioOutput.h +++ b/src/Audio/AudioOutput.h @@ -33,7 +33,6 @@ public slots: private slots: void _stateChanged (QTextToSpeech::State state); - void _languageChanged (const QLocale locale); protected: QTextToSpeech* _tts; diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index 6367e758f8247562c4e50123315a31433e566347..800462089497ae99b8d7de7182ce1bfa6f20aee6 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -42,7 +42,6 @@ #include "QGC.h" #include "QGCApplication.h" -#include "AudioOutput.h" #include "CmdLineOptParser.h" #include "UDPLink.h" #include "LinkManager.h" diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index cf12aee9098775b2028774bc555718d376bc1f34..8ff3632addad201ce29df2603d507625d00b1289 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -28,7 +28,6 @@ #include "ParameterManager.h" #include "QGCApplication.h" #include "QGCImageProvider.h" -#include "AudioOutput.h" #include "FollowMe.h" #include "MissionCommandTree.h" #include "QGroundControlQmlGlobal.h" diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index cb1101612634473c48c06d35b7d808cce2375bf2..16e80abf28ca5d640eda62547a3627aae6bd5795 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -26,7 +26,6 @@ #include "UAS.h" #include "LinkInterface.h" #include "QGC.h" -#include "AudioOutput.h" #include "MAVLinkProtocol.h" #include "QGCMAVLink.h" #include "LinkManager.h"