Fixed 2 speech-dispatcher bugs. First, multiword voice names were not available. Next, when the module changed the old voice name was carried in causing some modules to fail. Ported over fixes from Fenrir. This mostly affected the quick speech keys.

This commit is contained in:
Storm Dragon
2026-07-25 04:52:17 -04:00
parent 65c0e57aa8
commit 6ec512ea33
3 changed files with 120 additions and 0 deletions
@@ -36,6 +36,7 @@ from . import cmdnames
from . import cthulhu
from . import dbus_service
from . import debug
from . import guilabels
from . import input_event
from . import keybindings
from . import messages
@@ -479,6 +480,20 @@ class SpeechAndVerbosityManager:
if not filtered:
return []
if hasattr(server, "getOutputModule"):
try:
module = server.getOutputModule() or ""
except Exception:
module = ""
if module:
default_name = guilabels.SPEECH_DEFAULT_VOICE % module
real_voices = [
voice for voice in filtered
if voice.get(speechserver.VoiceFamily.NAME) != default_name
]
if real_voices:
filtered = real_voices
if not self._should_filter_voices_by_locale(server):
return filtered
+2
View File
@@ -823,6 +823,8 @@ class SpeechServer(speechserver.SpeechServer):
def setOutputModule(self, module):
self._client.set_output_module(module)
self._default_voice_name = guilabels.SPEECH_DEFAULT_VOICE % module
self._current_voice_properties.pop(ACSS.FAMILY, None)
def stop(self):
self._cancel()