This commit is contained in:
yumoqing 2024-08-06 16:14:43 +08:00
parent 12c62f5d0b
commit db2421deff

View File

@ -36,7 +36,7 @@ def float32array_to_wav(samples, sample_rate=16000, num_channels=1):
# Write the header and data to a file # Write the header and data to a file
tmpfile = temp_file(suffix='.wav') tmpfile = temp_file(suffix='.wav')
with open(tmpfile, 'w') as f: with open(tmpfile, 'wb') as f:
f.write(header) f.write(header)
f.write(data) f.write(data)
return tmpfile return tmpfile