bugfix
This commit is contained in:
parent
fb2bd4041c
commit
d1f3b10569
@ -11,6 +11,7 @@ import struct
|
|||||||
|
|
||||||
def audio_dic2list(audio):
|
def audio_dic2list(audio):
|
||||||
ks = [k for k in audio.keys()]
|
ks = [k for k in audio.keys()]
|
||||||
|
info(f'{type(audio)}, {ks=}')
|
||||||
ks.sort()
|
ks.sort()
|
||||||
return [audio[k] for k in ks]
|
return [audio[k] for k in ks]
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ def float32array_to_wav(samples, sample_rate=16000, num_channels=1):
|
|||||||
byte_rate, block_align, 32, b'data', num_samples * 4
|
byte_rate, block_align, 32, b'data', num_samples * 4
|
||||||
)
|
)
|
||||||
|
|
||||||
info(f'float32array_to_wav({samples[:10]}, ...)')
|
# info(f'float32array_to_wav({samples[:10]}, ...)')
|
||||||
# Convert the Float32Array to bytes
|
# Convert the Float32Array to bytes
|
||||||
data = struct.pack('f' * num_samples, *samples)
|
data = struct.pack('f' * num_samples, *samples)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user