No sound played without this fix on window (#174)

(pre-commit hook done)
This commit is contained in:
dtesniere
2026-01-26 10:28:20 +01:00
committed by GitHub
parent 13f343f88c
commit 4c4f65e147

View File

@@ -217,12 +217,15 @@ def main():
gen = TTSGen(tts_model, [condition_attributes], on_frame=_on_frame)
with sd.OutputStream(
samplerate=tts_model.mimi.sample_rate,
blocksize=1920,
channels=1,
callback=audio_callback,
) and tts_model.mimi.streaming(1):
with (
sd.OutputStream(
samplerate=tts_model.mimi.sample_rate,
blocksize=1920,
channels=1,
callback=audio_callback,
),
tts_model.mimi.streaming(1),
):
first_turn = True
for line in sys.stdin:
entries = prepare_script(tts_model, line.strip(), first_turn=first_turn)