mirror of
https://github.com/2noise/ChatTTS.git
synced 2026-09-01 14:55:37 +08:00
fix(webui): try to fix wave struct.error
'H' format requires 0 <= number <= 65535 according to https://stackoverflow.com/questions/40822877/scipy-io-cant-write-wavfile
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user