Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all
Unified · Split
| @@ -182,7 +182,7 @@ · 181 unmodified lines | ||
| 182 | 182 | #include "scripting/RatesScriptingInterface.h" |
| 183 | 183 | #include "scripting/SelectionScriptingInterface.h" |
| 184 | 184 | #include "scripting/WalletScriptingInterface.h" |
| 185 | −#include "scripting/SpeechScriptingInterface.h" | |
| 185 | +#include "scripting/TTSScriptingInterface.h" | |
| 186 | 186 | #if defined(Q_OS_MAC) || defined(Q_OS_WIN) |
| 187 | 187 | #include "SpeechRecognizer.h" |
| 188 | 188 | #endif |
| @@ -944,7 +944,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) { · 755 unmodified lines | ||
| 944 | 944 | DependencyManager::set<Ledger>(); |
| 945 | 945 | DependencyManager::set<Wallet>(); |
| 946 | 946 | DependencyManager::set<WalletScriptingInterface>(); |
| 947 | − DependencyManager::set<SpeechScriptingInterface>(); | |
| 947 | + DependencyManager::set<TTSScriptingInterface>(); | |
| 948 | 948 | |
| 949 | 949 | DependencyManager::set<FadeEffect>(); |
| 950 | 950 | |
| @@ -1179,6 +1179,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 228 unmodified lines | ||
| 1179 | 1179 | recording::Frame::registerFrameHandler(AudioConstants::getAudioFrameName(), [&audioIO](recording::Frame::ConstPointer frame) { |
| 1180 | 1180 | audioIO->handleRecordedAudioInput(frame->data); |
| 1181 | 1181 | }); |
| 1182 | + | |
| 1183 | + auto TTS = DependencyManager::get<TTSScriptingInterface>().data(); | |
| 1184 | + connect(TTS, &TTSScriptingInterface::ttsSampleCreated, audioIO, &AudioClient::handleTTSAudioInput); | |
| 1182 | 1185 | |
| 1183 | 1186 | connect(audioIO, &AudioClient::inputReceived, [](const QByteArray& audio) { |
| 1184 | 1187 | static auto recorder = DependencyManager::get<recording::Recorder>(); |
| @@ -3129,7 +3132,7 @@ void Application::onDesktopRootContextCreated(QQmlContext* surfaceContext) { · 1944 unmodified lines | ||
| 3129 | 3132 | surfaceContext->setContextProperty("ContextOverlay", DependencyManager::get<ContextOverlayInterface>().data()); |
| 3130 | 3133 | surfaceContext->setContextProperty("Wallet", DependencyManager::get<WalletScriptingInterface>().data()); |
| 3131 | 3134 | surfaceContext->setContextProperty("HiFiAbout", AboutUtil::getInstance()); |
| 3132 | − surfaceContext->setContextProperty("Speech", DependencyManager::get<SpeechScriptingInterface>().data()); | |
| 3135 | + surfaceContext->setContextProperty("TextToSpeech", DependencyManager::get<TTSScriptingInterface>().data()); | |
| 3133 | 3136 | |
| 3134 | 3137 | if (auto steamClient = PluginManager::getInstance()->getSteamClientPlugin()) { |
| 3135 | 3138 | surfaceContext->setContextProperty("Steam", new SteamScriptingInterface(engine, steamClient.get())); |
| @@ -6800,7 +6803,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe · 3664 unmodified lines | ||
| 6800 | 6803 | scriptEngine->registerGlobalObject("Wallet", DependencyManager::get<WalletScriptingInterface>().data()); |
| 6801 | 6804 | scriptEngine->registerGlobalObject("AddressManager", DependencyManager::get<AddressManager>().data()); |
| 6802 | 6805 | scriptEngine->registerGlobalObject("HifiAbout", AboutUtil::getInstance()); |
| 6803 | − scriptEngine->registerGlobalObject("Speech", DependencyManager::get<SpeechScriptingInterface>().data()); | |
| 6806 | + scriptEngine->registerGlobalObject("TextToSpeech", DependencyManager::get<TTSScriptingInterface>().data()); | |
| 6804 | 6807 | |
| 6805 | 6808 | qScriptRegisterMetaType(scriptEngine.data(), OverlayIDtoScriptValue, OverlayIDfromScriptValue); |
| 6806 | 6809 | |