Update app.py
Browse files
app.py
CHANGED
|
@@ -146,7 +146,8 @@ def process_audio(
|
|
| 146 |
# Save output
|
| 147 |
progress(0.9, desc="Saving output...")
|
| 148 |
output_path = tempfile.NamedTemporaryFile(delete=False, suffix=".wav").name
|
| 149 |
-
|
|
|
|
| 150 |
|
| 151 |
# Get info
|
| 152 |
duration = audio.shape[1] / sr
|
|
|
|
| 146 |
# Save output
|
| 147 |
progress(0.9, desc="Saving output...")
|
| 148 |
output_path = tempfile.NamedTemporaryFile(delete=False, suffix=".wav").name
|
| 149 |
+
# Save using soundfile instead of torchaudio
|
| 150 |
+
sf.write(output_path, audio.squeeze().numpy().T, sr)
|
| 151 |
|
| 152 |
# Get info
|
| 153 |
duration = audio.shape[1] / sr
|