tts fix big pictures
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user