Browse Source

replace "sox" backend for reference_audio (#539)

"sox" backend does not support reading from file
jmoney7823956789378 1 year ago
parent
commit
111ff16c1b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tools/api.py

+ 1 - 1
tools/api.py

@@ -92,7 +92,7 @@ def load_audio(reference_audio, sr):
         reference_audio = io.BytesIO(audio_data)
 
     waveform, original_sr = torchaudio.load(
-        reference_audio, backend="sox" if sys.platform == "linux" else "soundfile"
+        reference_audio, backend="ffmpeg" if sys.platform == "linux" else "soundfile"
     )
 
     if waveform.shape[0] > 1: