From 5c7e397269248cead75310f659ff61f585431483 Mon Sep 17 00:00:00 2001 From: haopeng <657407891@qq.com> Date: Wed, 30 Oct 2024 16:09:09 +0800 Subject: [PATCH] Fix streaming in webui (#643) --- tools/webui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/webui.py b/tools/webui.py index ffe52da0..6863c63a 100644 --- a/tools/webui.py +++ b/tools/webui.py @@ -146,7 +146,9 @@ def inference( segments.append(fake_audios) if streaming: - yield (fake_audios * 32768).astype(np.int16).tobytes(), None, None + wav_header = wav_chunk_header() + audio_data = (fake_audios * 32768).astype(np.int16).tobytes() + yield wav_header + audio_data, None, None if len(segments) == 0: return (