The open-source AI voice studio. Clone, dictate, create.
fix: specify WAV format for atomic save temp file
James Pinebfe912e41aaa
diff --git a/backend/utils/audio.py b/backend/utils/audio.pyindex ab60d0a5..2c6de760 100644--- a/backend/utils/audio.py+++ b/backend/utils/audio.py@@ -92,8 +92,9 @@ def save_audio(# Ensure parent directory existsPath(path).parent.mkdir(parents=True, exist_ok=True)- # Write to temporary file first- sf.write(temp_path, audio, sample_rate)+ # Write to temporary file first (explicit format since .tmp+ # extension is not recognised by soundfile)+ sf.write(temp_path, audio, sample_rate, format='WAV')# Atomic rename to final pathos.replace(temp_path, path)