Spaces:
Sleeping
Sleeping
File size: 424 Bytes
5d20072 5a23c65 5d20072 5a23c65 d344ece 5d20072 d344ece 5a23c65 92b85f4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import streamlit as st
from spleeter.separator import Separator
def split_vocals(input_file):
separator = Separator('spleeter:2stems')
separator.separate_to_file(input_file, '')
audio_value = st.experimental_audio_input("Record a voice message")
if audio_value:
with open("user_sing.mp3", "wb") as f:
f.write(audio_value.getbuffer())
split_vocals('user_sing.mp3')
st.audio("user_sing.mp3") |