Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import streamlit as st
|
2 |
-
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
|
8 |
audio_value = st.experimental_audio_input("Record a voice message")
|
9 |
|
@@ -11,4 +11,5 @@ if audio_value:
|
|
11 |
with open("user_sing.mp3", "wb") as f:
|
12 |
f.write(audio_value.getbuffer())
|
13 |
|
|
|
14 |
st.audio("user_sing.mp3")
|
|
|
1 |
import streamlit as st
|
2 |
+
from spleeter.separator import Separator
|
3 |
|
4 |
+
def split_vocals(input_file):
|
5 |
+
separator = Separator('spleeter:2stems')
|
6 |
+
separator.separate_to_file(input_file, '')
|
7 |
|
8 |
audio_value = st.experimental_audio_input("Record a voice message")
|
9 |
|
|
|
11 |
with open("user_sing.mp3", "wb") as f:
|
12 |
f.write(audio_value.getbuffer())
|
13 |
|
14 |
+
split_vocals('user_sing.mp3')
|
15 |
st.audio("user_sing.mp3")
|