nakas commited on
Commit
dffb5f5
1 Parent(s): 728ba5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,13 +1,13 @@
1
  import gradio as gr
2
  from pedalboard import Pedalboard, Chorus, Reverb, Distortion
3
  from pedalboard.io import AudioFile
4
- def greet(name):
5
  with AudioFile(name) as f:
6
  audio = f.read(f.frames)
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)
@@ -17,7 +17,7 @@ def greet(name):
17
  f.write(effected)
18
  return output
19
 
20
- demo = gr.Interface(fn=greet, inputs=gr.Audio(type="filepath"), outputs=gr.Audio(type="filepath"))
21
 
22
  demo.launch()
23
 
 
1
  import gradio as gr
2
  from pedalboard import Pedalboard, Chorus, Reverb, Distortion
3
  from pedalboard.io import AudioFile
4
+ def greet(name,rooms):
5
  with AudioFile(name) as f:
6
  audio = f.read(f.frames)
7
  samplerate = f.samplerate
8
 
9
  # Make a Pedalboard object, containing multiple plugins:
10
+ board = Pedalboard([Chorus(), Reverb(room_size=rooms])
11
 
12
  # Run the audio through this pedalboard!
13
  effected = board(audio, samplerate)
 
17
  f.write(effected)
18
  return output
19
 
20
+ demo = gr.Interface(fn=greet, inputs=(gr.Audio(type="filepath"),gr.Slider(.02, 1, value=0.25),), outputs=gr.Audio(type="filepath"))
21
 
22
  demo.launch()
23