[skip ci] fix(wav format): fix default WAV format for audio storage

This commit is contained in:
CarolinePascal
2025-04-16 19:03:52 +02:00
parent b9d0dfb9a2
commit 6d7be63f59
@@ -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: