Spaces:
Runtime error
Runtime error
Commit
·
376d02b
1
Parent(s):
f6561a5
fix app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,10 @@ from denoisers.SpectralGating import SpectralGating
|
|
6 |
|
7 |
|
8 |
def denoising_transform(audio):
|
9 |
-
src_path = "cache_wav/original/{}.wav".format(str(uuid.uuid4()))
|
10 |
-
tgt_path = "cache_wav/denoised/{}.wav".format(str(uuid.uuid4()))
|
|
|
|
|
11 |
(ffmpeg.input(audio)
|
12 |
.output(src_path, acodec='pcm_s16le', ac=1, ar=22050)
|
13 |
.run()
|
|
|
6 |
|
7 |
|
8 |
def denoising_transform(audio):
|
9 |
+
src_path = Path("cache_wav/original/{}.wav".format(str(uuid.uuid4())))
|
10 |
+
tgt_path = Path("cache_wav/denoised/{}.wav".format(str(uuid.uuid4())))
|
11 |
+
src_path.parent.mkdir(exist_ok=True)
|
12 |
+
tgt_path.parent.mkdir(exist_ok=True)
|
13 |
(ffmpeg.input(audio)
|
14 |
.output(src_path, acodec='pcm_s16le', ac=1, ar=22050)
|
15 |
.run()
|