Stabilize TTS voice reload and reconnect logging

This commit is contained in:
2026-05-19 17:08:48 +02:00
parent 256cc2c7a7
commit 7c5d194376
6 changed files with 148 additions and 27 deletions
+2 -1
View File
@@ -1199,7 +1199,8 @@ class TTSFactoryModule extends BaseModule {
} else if (handler && typeof handler.configure === 'function') {
handler.configure(voiceOptions);
}
if (voiceOptions.language && !voiceOptions.voice && handler && typeof handler.selectVoiceForLocale === 'function') {
const handlerHasVoice = Boolean(this.getEffectiveVoiceId(handler));
if (voiceOptions.language && !voiceOptions.voice && !handlerHasVoice && handler && typeof handler.selectVoiceForLocale === 'function') {
handler.selectVoiceForLocale(voiceOptions.language);
}
}