Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ if api_key is None:
|
|
| 12 |
client = Groq(api_key=api_key)
|
| 13 |
|
| 14 |
def process_audio(file_path):
|
| 15 |
-
|
| 16 |
try:
|
| 17 |
# Open the audio file
|
| 18 |
with open(file_path, "rb") as file:
|
|
@@ -26,7 +26,7 @@ def process_audio(file_path):
|
|
| 26 |
temperature=0.0 # Optional
|
| 27 |
)
|
| 28 |
# Return the transcription text
|
| 29 |
-
|
| 30 |
return transcription.text
|
| 31 |
except Exception as e:
|
| 32 |
return f"An error occurred: {str(e)}"
|
|
|
|
| 12 |
client = Groq(api_key=api_key)
|
| 13 |
|
| 14 |
def process_audio(file_path):
|
| 15 |
+
|
| 16 |
try:
|
| 17 |
# Open the audio file
|
| 18 |
with open(file_path, "rb") as file:
|
|
|
|
| 26 |
temperature=0.0 # Optional
|
| 27 |
)
|
| 28 |
# Return the transcription text
|
| 29 |
+
inputs.clear()
|
| 30 |
return transcription.text
|
| 31 |
except Exception as e:
|
| 32 |
return f"An error occurred: {str(e)}"
|