Spaces:
Runtime error
Runtime error
Hendrik Schroeter
commited on
Commit
•
973537b
1
Parent(s):
34ea105
test upload
Browse files- app.py +4 -2
- samples/noise_freesound_2530.wav +0 -3
app.py
CHANGED
@@ -46,6 +46,8 @@ def as_gradio_audio(x):
|
|
46 |
|
47 |
|
48 |
def mix_and_denoise(speech, noise, snr):
|
|
|
|
|
49 |
print(speech, noise, snr)
|
50 |
sr = config("sr", 48000, int, section="df")
|
51 |
speech, _ = load_audio(speech, sr)
|
@@ -60,10 +62,10 @@ def mix_and_denoise(speech, noise, snr):
|
|
60 |
|
61 |
inputs = [
|
62 |
gradio.inputs.Audio(
|
63 |
-
source="microphone", type="filepath", optional=True, label="Speech"
|
64 |
),
|
65 |
gradio.inputs.Audio(
|
66 |
-
source="
|
67 |
),
|
68 |
gradio.inputs.Slider(minimum=-10, maximum=40, step=5, default=10),
|
69 |
]
|
|
|
46 |
|
47 |
|
48 |
def mix_and_denoise(speech, noise, snr):
|
49 |
+
if noise is None:
|
50 |
+
noise = "samples/dkitchen.wav"
|
51 |
print(speech, noise, snr)
|
52 |
sr = config("sr", 48000, int, section="df")
|
53 |
speech, _ = load_audio(speech, sr)
|
|
|
62 |
|
63 |
inputs = [
|
64 |
gradio.inputs.Audio(
|
65 |
+
source="microphone,upload", type="filepath", optional=True, label="Speech"
|
66 |
),
|
67 |
gradio.inputs.Audio(
|
68 |
+
source="upload", type="filepath", optional=True, label="Noise"
|
69 |
),
|
70 |
gradio.inputs.Slider(minimum=-10, maximum=40, step=5, default=10),
|
71 |
]
|
samples/noise_freesound_2530.wav
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:cc774d58170fc5b8f143345ef8ff31583feef71f23f447336fdd56c8478d8a8a
|
3 |
-
size 6564092
|
|
|
|
|
|
|
|