Migrate to Deepgram STT, Silero v5 TTS, and fix wake word mic handling

This commit is contained in:
2026-01-07 17:59:18 +03:00
parent 7b79593cad
commit 53809c03f4
5 changed files with 233 additions and 89 deletions

6
tts.py
View File

@@ -1,6 +1,6 @@
"""
Text-to-Speech module using Silero TTS.
Generates natural Russian speech with Xenia voice.
Generates natural Russian speech.
Supports interruption via wake word detection using threading.
"""
@@ -140,10 +140,6 @@ class TextToSpeech:
except Exception as e:
print(f"❌ Ошибка TTS (часть {i + 1}/{total_chunks}): {e}")
success = False
# Continue with next chunk? or break?
# Usually if one fails, we might want to try others, but for "too long" error
# splitting should solve it. If it fails for other reasons, maybe better to stop.
# But let's keep trying subsequent chunks in case it's a specific symbol issue.
if success and not self._interrupted:
print("✅ Воспроизведение завершено")