Spaces:
Runtime error
Runtime error
Hendrik Schroeter
commited on
Commit
•
7d50d5d
1
Parent(s):
baa5010
backwards compat
Browse files
app.py
CHANGED
@@ -41,13 +41,13 @@ def mix_at_snr(clean, noise, snr, eps=1e-10):
|
|
41 |
|
42 |
|
43 |
def as_gradio_audio(x):
|
44 |
-
sr = config
|
45 |
return sr, (x / 0x7FFF).to(torch.int16).cpu().numpy()
|
46 |
|
47 |
|
48 |
def mix_and_denoise(speech, noise, snr):
|
49 |
print(speech, noise, snr)
|
50 |
-
sr = config
|
51 |
speech, _ = load_audio(speech, sr)
|
52 |
noise, _ = load_audio(noise, sr)
|
53 |
speech, noise, noisy = mix_at_snr(speech, noise, snr)
|
|
|
41 |
|
42 |
|
43 |
def as_gradio_audio(x):
|
44 |
+
sr = config("sr", 48000, int, section="df")
|
45 |
return sr, (x / 0x7FFF).to(torch.int16).cpu().numpy()
|
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)
|
52 |
noise, _ = load_audio(noise, sr)
|
53 |
speech, noise, noisy = mix_at_snr(speech, noise, snr)
|