Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ from gtts import gTTS
|
|
| 9 |
import speech_recognition as sr
|
| 10 |
import os
|
| 11 |
import tempfile
|
| 12 |
-
from langdetect import detect
|
| 13 |
|
| 14 |
|
| 15 |
# ---------------------------
|
|
@@ -82,9 +82,6 @@ def handle_voice_query(audio_file):
|
|
| 82 |
query = transcribe_audio(audio_file)
|
| 83 |
response = get_gemini_response(query)
|
| 84 |
audio_path = text_to_speech(response)
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
return query, response, audio_path
|
| 89 |
|
| 90 |
# ---------------------------
|
|
|
|
| 9 |
import speech_recognition as sr
|
| 10 |
import os
|
| 11 |
import tempfile
|
| 12 |
+
# from langdetect import detect
|
| 13 |
|
| 14 |
|
| 15 |
# ---------------------------
|
|
|
|
| 82 |
query = transcribe_audio(audio_file)
|
| 83 |
response = get_gemini_response(query)
|
| 84 |
audio_path = text_to_speech(response)
|
|
|
|
|
|
|
|
|
|
| 85 |
return query, response, audio_path
|
| 86 |
|
| 87 |
# ---------------------------
|