bartman081523
commited on
Commit
•
9e479ab
1
Parent(s):
b56f897
Update app.py
Browse files
app.py
CHANGED
@@ -62,19 +62,10 @@ def convert_to_wav(data, sample_rate):
|
|
62 |
|
63 |
return temp_file
|
64 |
|
65 |
-
def play_and_download_sound(noise_ratio, lowcut, highcut, duration, pop_rate)
|
66 |
data, sample_rate = generate_vinyl_sound(noise_ratio, lowcut, highcut, duration, pop_rate)
|
67 |
temp_file = convert_to_wav(data, sample_rate)
|
68 |
-
|
69 |
-
display(audio)
|
70 |
-
|
71 |
-
return audio, temp_file
|
72 |
-
|
73 |
-
def download_sound(noise_ratio, lowcut, highcut, duration, pop_rate):
|
74 |
-
data, sample_rate = generate_vinyl_sound(noise_ratio, lowcut, highcut, duration, pop_rate)
|
75 |
-
temp_file = convert_to_wav(data, sample_rate)
|
76 |
-
shutil.move(temp_file, "download.wav")
|
77 |
-
return "download.wav"
|
78 |
|
79 |
iface = gr.Interface(
|
80 |
fn=play_and_download_sound,
|
|
|
62 |
|
63 |
return temp_file
|
64 |
|
65 |
+
def play_and_download_sound(noise_ratio, lowcut, highcut, duration, pop_rate):
|
66 |
data, sample_rate = generate_vinyl_sound(noise_ratio, lowcut, highcut, duration, pop_rate)
|
67 |
temp_file = convert_to_wav(data, sample_rate)
|
68 |
+
return temp_file, temp_file
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
iface = gr.Interface(
|
71 |
fn=play_and_download_sound,
|