sahandkh1419 commited on
Commit
1a2e1f9
1 Parent(s): 097938c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -2,8 +2,11 @@ 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:
@@ -11,4 +14,4 @@ if audio_value:
11
 
12
  user_lyrics = model.transcribe("user_sing.mp3")["text"]
13
  st.write(user_lyrics)
14
- # st.audio("user_sing.mp3")
 
2
  import whisper
3
 
4
  model = whisper.load_model("base")
5
+ st.audio("titanic.mp3")
6
+ st.write("Please wait for the music to finish before recording the rest of it by your own.")
7
 
8
  audio_value = st.experimental_audio_input("Record a voice message")
9
+ lyrics = "Far across the distance And spaces between us You have come to show you go on"
10
 
11
  if audio_value:
12
  with open("user_sing.mp3", "wb") as f:
 
14
 
15
  user_lyrics = model.transcribe("user_sing.mp3")["text"]
16
  st.write(user_lyrics)
17
+