mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-24 04:59:47 +00:00
[skip ci] fix(wav format): fix default WAV format for audio storage
This commit is contained in:
@@ -197,10 +197,11 @@ class PortAudioMicrophone(Microphone):
|
|||||||
# Can only be run on a single process/thread for file writing safety
|
# Can only be run on a single process/thread for file writing safety
|
||||||
with sf.SoundFile(
|
with sf.SoundFile(
|
||||||
output_file,
|
output_file,
|
||||||
mode="x",
|
mode="w",
|
||||||
samplerate=sample_rate,
|
samplerate=sample_rate,
|
||||||
channels=max(channels),
|
channels=max(channels),
|
||||||
subtype=sf.default_subtype(output_file.suffix[1:]),
|
format="WAV",
|
||||||
|
subtype="FLOAT", # By default, a much lower quality WAV file is created !
|
||||||
) as file:
|
) as file:
|
||||||
while not event.is_set():
|
while not event.is_set():
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user