Spaces:
Runtime error
Runtime error
Fix backend
Browse files- tools/api.py +1 -1
tools/api.py
CHANGED
|
@@ -92,7 +92,7 @@ def load_audio(reference_audio, sr):
|
|
| 92 |
reference_audio = io.BytesIO(audio_data)
|
| 93 |
|
| 94 |
waveform, original_sr = torchaudio.load(
|
| 95 |
-
reference_audio, backend="
|
| 96 |
)
|
| 97 |
|
| 98 |
if waveform.shape[0] > 1:
|
|
|
|
| 92 |
reference_audio = io.BytesIO(audio_data)
|
| 93 |
|
| 94 |
waveform, original_sr = torchaudio.load(
|
| 95 |
+
reference_audio, backend="soundfile" if sys.platform == "linux" else "soundfile"
|
| 96 |
)
|
| 97 |
|
| 98 |
if waveform.shape[0] > 1:
|