Spaces:
Running
Running
sahandkh1419
commited on
Commit
•
d344ece
1
Parent(s):
919463c
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,14 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
audio_value = st.experimental_audio_input("Record a voice message")
|
4 |
|
5 |
if audio_value:
|
|
|
|
|
|
|
6 |
st.audio(audio_value)
|
|
|
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 |
|
10 |
if audio_value:
|
11 |
+
with open("user_sing.mp3", "wb") as f:
|
12 |
+
f.write(audio_value.getbuffer())
|
13 |
+
|
14 |
st.audio(audio_value)
|