Spaces:
Runtime error
Runtime error
testing audio
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def process_speech(audio):
|
|
| 35 |
"English",# target language
|
| 36 |
api_name="/run",
|
| 37 |
)
|
| 38 |
-
|
| 39 |
try :
|
| 40 |
return f"{out}"
|
| 41 |
except Exception as e :
|
|
@@ -226,6 +226,7 @@ def process_and_query(text, image, audio):
|
|
| 226 |
|
| 227 |
if audio is not None:
|
| 228 |
text = process_speech(audio)
|
|
|
|
| 229 |
|
| 230 |
# Now, use the text (either provided by the user or obtained from OpenAI) to query Vectara
|
| 231 |
vectara_response_json = query_vectara(text)
|
|
|
|
| 35 |
"English",# target language
|
| 36 |
api_name="/run",
|
| 37 |
)
|
| 38 |
+
out = out[1] # get the text
|
| 39 |
try :
|
| 40 |
return f"{out}"
|
| 41 |
except Exception as e :
|
|
|
|
| 226 |
|
| 227 |
if audio is not None:
|
| 228 |
text = process_speech(audio)
|
| 229 |
+
return f"{text}"
|
| 230 |
|
| 231 |
# Now, use the text (either provided by the user or obtained from OpenAI) to query Vectara
|
| 232 |
vectara_response_json = query_vectara(text)
|