Compare commits

..

2 Commits

Author SHA1 Message Date
yumoqing
a41a7f7230 bugfix 2024-08-06 16:20:52 +08:00
yumoqing
d28b884f6d bugfix 2024-08-06 16:20:21 +08:00

View File

@ -31,6 +31,7 @@ def float32array_to_wav(samples, sample_rate=16000, num_channels=1):
byte_rate, block_align, 32, b'data', num_samples * 4
)
info(f'float32array_to_wav({samples[:10]}, ...)')
# Convert the Float32Array to bytes
data = struct.pack('f' * num_samples, *samples)
@ -43,7 +44,6 @@ def float32array_to_wav(samples, sample_rate=16000, num_channels=1):
async def generate(request, **kw):
params_kw = kw.get('params_kw', DictObject())
info(f'{params_kw=}')
model = params_kw.model
audio = params_kw.audio
if audio is None: