sahandkh1419 commited on
Commit
5a23c65
·
verified ·
1 Parent(s): 92b85f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -1,9 +1,9 @@
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,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")