Skip to content

Commit

Permalink
Fix streaming in webui (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhpqaq authored Oct 30, 2024
1 parent f8a57fb commit 5c7e397
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 5c7e397

Please sign in to comment.