Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,15 +7,15 @@ def greet(name):
|
|
7 |
samplerate = f.samplerate
|
8 |
|
9 |
# Make a Pedalboard object, containing multiple plugins:
|
10 |
-
|
11 |
|
12 |
# Run the audio through this pedalboard!
|
13 |
-
|
14 |
-
|
15 |
# Write the audio back as a wav file:
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
|
20 |
demo = gr.Interface(fn=greet, inputs=gr.Audio(type="filepath"), outputs=gr.Audio(type="filepath"))
|
21 |
|
|
|
7 |
samplerate = f.samplerate
|
8 |
|
9 |
# Make a Pedalboard object, containing multiple plugins:
|
10 |
+
board = Pedalboard([Chorus(), Reverb(room_size=0.25)])
|
11 |
|
12 |
# Run the audio through this pedalboard!
|
13 |
+
effected = board(audio, samplerate)
|
14 |
+
output = "output.wav"
|
15 |
# Write the audio back as a wav file:
|
16 |
+
with AudioFile('output.wav', 'w', samplerate, effected.shape[0]) as f:
|
17 |
+
f.write(effected)
|
18 |
+
return name
|
19 |
|
20 |
demo = gr.Interface(fn=greet, inputs=gr.Audio(type="filepath"), outputs=gr.Audio(type="filepath"))
|
21 |
|