Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
-
import streamlit as st
|
2 |
import base64
|
3 |
import io
|
4 |
-
|
5 |
-
from gtts import gTTS
|
6 |
import pydub
|
7 |
import speech_recognition as sr
|
|
|
|
|
|
|
8 |
from streamlit_mic_recorder import st_mic_recorder
|
9 |
|
10 |
pre_prompt_text = ""
|
@@ -116,4 +117,6 @@ def def_main():
|
|
116 |
f"""<audio autoplay="autoplay" controls="controls" src="data:audio/mp3;base64,{base64.b64encode(audio_file.read()).decode()}" type="audio/mp3" id="audio_player"></audio>""",
|
117 |
unsafe_allow_html=True)
|
118 |
else:
|
119 |
-
st.write("Waiting for voice input...")
|
|
|
|
|
|
|
|
1 |
import base64
|
2 |
import io
|
3 |
+
import numpy as np
|
|
|
4 |
import pydub
|
5 |
import speech_recognition as sr
|
6 |
+
import streamlit as st
|
7 |
+
from huggingface_hub import InferenceClient
|
8 |
+
from gtts import gTTS
|
9 |
from streamlit_mic_recorder import st_mic_recorder
|
10 |
|
11 |
pre_prompt_text = ""
|
|
|
117 |
f"""<audio autoplay="autoplay" controls="controls" src="data:audio/mp3;base64,{base64.b64encode(audio_file.read()).decode()}" type="audio/mp3" id="audio_player"></audio>""",
|
118 |
unsafe_allow_html=True)
|
119 |
else:
|
120 |
+
st.write("Waiting for voice input...")
|
121 |
+
|
122 |
+
def_main()
|