Closed sourav-bz closed 1 month ago
Hi @sourav-bz
Please take a look at the Async example: https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/speech-to-text/websocket/async_http/main.py
You are missing a bunch of async
declarations in your code. Example:
def on_open():
Should be:
async def on_open():
The call to start()
is also incorrect (missing await
):
if dg_connection.start(options, addons=addons) is False:
Should be:
if await dg_connection.start(options) is False:
You have a number of errors like that, which will cause calls to those functions to hang.
If you are still having problems, drop by Discord and I would be happy to discuss!
Bug Report: Deepgram WebSocket Connection Issue
Current Behavior
When running the script
stt-dg.py
, the following output is observed:Issue Description
The script is not connecting and listening to the WebSocket for live transcripts as expected.
Steps to Reproduce
The following code is being used:
Environment