Skip to content

Commit

Permalink
fix(webui): try to fix wave struct.error
Browse files Browse the repository at this point in the history
'H' format requires 0 <= number <= 65535

according to https://stackoverflow.com/questions/40822877/scipy-io-cant-write-wavfile
  • Loading branch information
fumiama committed Jul 7, 2024
1 parent bfe5f26 commit 2f07b8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/web/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ def generate_audio(
for gen in wav:
audio = gen[0]
if audio is not None and len(audio) > 0:
yield 24000, unsafe_float_to_int16(audio)
yield 24000, unsafe_float_to_int16(audio).T
del audio
else:
yield 24000, unsafe_float_to_int16(wav[0])
yield 24000, unsafe_float_to_int16(wav[0]).T


def interrupt_generate():
Expand Down

0 comments on commit 2f07b8b

Please sign in to comment.