Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -33,12 +33,12 @@ def response(
|
|
33 |
chatbot = chatbot or []
|
34 |
messages = [{"role": d["role"], "content": d["content"]} for d in chatbot]
|
35 |
start = time.time()
|
36 |
-
|
37 |
-
text = groq_client.audio.transcriptions.create(
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
).text
|
42 |
print("transcription", time.time() - start)
|
43 |
print("prompt", text)
|
44 |
chatbot.append({"role": "user", "content": text})
|
|
|
33 |
chatbot = chatbot or []
|
34 |
messages = [{"role": d["role"], "content": d["content"]} for d in chatbot]
|
35 |
start = time.time()
|
36 |
+
text = stt(audio)
|
37 |
+
# text = groq_client.audio.transcriptions.create(
|
38 |
+
# file=("audio-file.mp3", audio_to_bytes(audio)),
|
39 |
+
# model="whisper-large-v3-turbo",
|
40 |
+
# response_format="verbose_json",
|
41 |
+
# ).text
|
42 |
print("transcription", time.time() - start)
|
43 |
print("prompt", text)
|
44 |
chatbot.append({"role": "user", "content": text})
|