diff --git a/src/lerobot/microphones/portaudio/microphone_portaudio.py b/src/lerobot/microphones/portaudio/microphone_portaudio.py index 25f4a8a66..106f9060d 100644 --- a/src/lerobot/microphones/portaudio/microphone_portaudio.py +++ b/src/lerobot/microphones/portaudio/microphone_portaudio.py @@ -197,10 +197,11 @@ class PortAudioMicrophone(Microphone): # Can only be run on a single process/thread for file writing safety with sf.SoundFile( output_file, - mode="x", + mode="w", samplerate=sample_rate, 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: while not event.is_set(): try: