Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -215,7 +215,7 @@ def transcription_content(file):
|
|
| 215 |
payload = {"buffer": buffer_data}
|
| 216 |
options = PrerecordedOptions(model="nova-2", smart_format=True, diarize=True)
|
| 217 |
response = deepgram.listen.prerecorded.v("1").transcribe_file(payload, options)
|
| 218 |
-
return response.
|
| 219 |
except Exception as e:
|
| 220 |
print(f"Exception: {e}")
|
| 221 |
return None
|
|
|
|
| 215 |
payload = {"buffer": buffer_data}
|
| 216 |
options = PrerecordedOptions(model="nova-2", smart_format=True, diarize=True)
|
| 217 |
response = deepgram.listen.prerecorded.v("1").transcribe_file(payload, options)
|
| 218 |
+
return response.results.channels[0].alternatives[0].transcript
|
| 219 |
except Exception as e:
|
| 220 |
print(f"Exception: {e}")
|
| 221 |
return None
|