From 44d23afab4048f5442381df1cd8cc1dbcad9db62 Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 6 Jun 2023 11:29:43 -0400 Subject: [PATCH] Remove unused code In 4.x, we need to find out what language is being used, so that we can break words. In 3.x, we assume that spaces spearate words. So we do not need to find the language for the current voice. --- platform/x11/tts_linux.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/platform/x11/tts_linux.cpp b/platform/x11/tts_linux.cpp index 82491798f..dc8c79c6f 100644 --- a/platform/x11/tts_linux.cpp +++ b/platform/x11/tts_linux.cpp @@ -106,19 +106,6 @@ void TTS_Linux::speech_event_callback(size_t p_msg_id, size_t p_client_id, SPDNo // Inject index mark after each word. String text; - String language; - SPDVoice **voices = spd_list_synthesis_voices(tts->synth); - if (voices != nullptr) { - SPDVoice **voices_ptr = voices; - while (*voices_ptr != nullptr) { - if (String::utf8((*voices_ptr)->name) == message.voice) { - language = String::utf8((*voices_ptr)->language); - break; - } - voices_ptr++; - } - free_spd_voices(voices); - } PoolIntArray breaks; for (int i = 0; i < message.text.size(); i++) { if (_is_whitespace(message.text[i])) {