tts fix big pictures

This commit is contained in:
2026-03-29 17:02:02 +02:00
parent 8a6bd4e0e7
commit 8281131432
3 changed files with 40 additions and 3 deletions
+3
View File
@@ -184,6 +184,9 @@ class VoiceEngine:
tmp_path = tmp.name
with wave.open(tmp_path, "wb") as wav_file:
wav_file.setnchannels(1)
wav_file.setsampwidth(2) # 16-bit
wav_file.setframerate(voice.config.sample_rate)
voice.synthesize(text, wav_file)
audio_data = Path(tmp_path).read_bytes()