Spaces:
Runtime error
Runtime error
fix double audio issue
Browse files
app.py
CHANGED
|
@@ -8,7 +8,8 @@ pipeline = pipeline.to("cuda")
|
|
| 8 |
|
| 9 |
def denoise(length_sec):
|
| 10 |
audios = pipeline(audio_length_in_s=length_sec).audios
|
| 11 |
-
|
|
|
|
| 12 |
return "maestro_test.wav"
|
| 13 |
|
| 14 |
gr.Interface(fn=denoise, inputs=gr.Slider(1.0, 6.0, value=3.0, step=0.5, label="Audio length in seconds"), outputs="audio").launch()
|
|
|
|
| 8 |
|
| 9 |
def denoise(length_sec):
|
| 10 |
audios = pipeline(audio_length_in_s=length_sec).audios
|
| 11 |
+
for audio in audios:
|
| 12 |
+
scipy.io.wavfile.write("maestro_test.wav", pipe.unet.sample_rate, audio.transpose())
|
| 13 |
return "maestro_test.wav"
|
| 14 |
|
| 15 |
gr.Interface(fn=denoise, inputs=gr.Slider(1.0, 6.0, value=3.0, step=0.5, label="Audio length in seconds"), outputs="audio").launch()
|