Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -12,10 +12,10 @@ separator = Separator('spleeter:2stems')
|
|
12 |
def extract_stems(audio):
|
13 |
|
14 |
# initiate a folder for splitted files
|
15 |
-
foldername =
|
16 |
|
17 |
# Separate audio input. Synchronous is true to wait for the end of split before going further
|
18 |
-
separator.separate_to_file(audio,
|
19 |
|
20 |
# To get full filepath, need to clean the input audio filepath (ex : /tmp/audioexample.mp3)
|
21 |
filepath = audio[5:] # remove first five chars aka /tmp/
|
|
|
12 |
def extract_stems(audio):
|
13 |
|
14 |
# initiate a folder for splitted files
|
15 |
+
foldername = str(random2.randrange(100000000))
|
16 |
|
17 |
# Separate audio input. Synchronous is true to wait for the end of split before going further
|
18 |
+
separator.separate_to_file(audio, "output/", filename_format= foldername + "/{instrument}.wav", synchronous=True)
|
19 |
|
20 |
# To get full filepath, need to clean the input audio filepath (ex : /tmp/audioexample.mp3)
|
21 |
filepath = audio[5:] # remove first five chars aka /tmp/
|