Spaces:
Running
Running
sahandkh1419
commited on
Commit
•
dea462a
1
Parent(s):
976196a
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,14 @@
|
|
1 |
import streamlit as st
|
2 |
-
|
|
|
|
|
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 |
-
|
15 |
-
st.
|
|
|
|
1 |
import streamlit as st
|
2 |
+
import whisper
|
3 |
+
|
4 |
+
model = whisper.load_model("base")
|
5 |
|
|
|
|
|
|
|
|
|
6 |
audio_value = st.experimental_audio_input("Record a voice message")
|
7 |
|
8 |
if audio_value:
|
9 |
with open("user_sing.mp3", "wb") as f:
|
10 |
f.write(audio_value.getbuffer())
|
11 |
|
12 |
+
user_lyrics = model.transcribe("user_sing.mp3")["text"]
|
13 |
+
st.write(user_lyrics)
|
14 |
+
# st.audio("user_sing.mp3")
|