Update app.py
Browse files
app.py
CHANGED
@@ -174,11 +174,10 @@ if prompt := st.chat_input("How can I help you today?"):
|
|
174 |
st.session_state['reference'] = '/home/user/app/pdf2image/default_output.png'
|
175 |
st.session_state['audio'] = '/home/user/app/audio/beep-06.mp3'
|
176 |
|
177 |
-
|
178 |
def generate_audio():
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
|
183 |
for item in output:
|
184 |
full_response += item
|
|
|
174 |
st.session_state['reference'] = '/home/user/app/pdf2image/default_output.png'
|
175 |
st.session_state['audio'] = '/home/user/app/audio/beep-06.mp3'
|
176 |
|
|
|
177 |
def generate_audio():
|
178 |
+
with open('/home/user/app/audio/audio.mp3','wb') as sound_file:
|
179 |
+
tts = gTTS(result['result'], lang='en', tld='co.in')
|
180 |
+
tts.write_to_fp(sound_file)
|
181 |
|
182 |
for item in output:
|
183 |
full_response += item
|