bartman081523 commited on
Commit
ef5f4d0
·
1 Parent(s): cd60907

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -78,6 +78,12 @@ iface = gr.Interface(
78
  ],
79
  outputs=[
80
  gr.outputs.Audio(type="numpy", label="Vinyl Sound"),
 
 
 
 
 
 
81
  ],
82
  title="Vinyl Sound Generator",
83
  description="Generate a synthetic vinyl sound using pink noise, rumble, hiss, and pops. Adjust the noise ratio, bandpass frequencies, duration, and pop rate to modify the sound.",
 
78
  ],
79
  outputs=[
80
  gr.outputs.Audio(type="numpy", label="Vinyl Sound"),
81
+ gr.outputs.HTML("<button onclick='downloadSound()'>Download Vinyl Sound</button>"
82
+ "<script>function downloadSound(){"
83
+ "var link = document.createElement('a');"
84
+ "link.href = '/download';"
85
+ "link.download = 'vinyl_sound.wav';"
86
+ "link.click();}</script>")
87
  ],
88
  title="Vinyl Sound Generator",
89
  description="Generate a synthetic vinyl sound using pink noise, rumble, hiss, and pops. Adjust the noise ratio, bandpass frequencies, duration, and pop rate to modify the sound.",