-
Notifications
You must be signed in to change notification settings - Fork 114
Description
What is the current behavior?
When using the Deepgram SDK with WebSocket version 14.0, the connection fails, and the following error is raised:TypeError: got an unexpected keyword argument 'extra_headers'.
However, Deepgram works fine with WebSocket version 13.1.
Steps to reproduce
Install WebSocket version 14.0
pip install websockets==14.0
Set up a Deepgram connection using the SDK.
pip install deepgram-sdk==3.7.6
Attempt to create a connection to Deepgram's API using
deepgram: DeepgramClient = DeepgramClient(DeepgramClientOptions(options={"keepalive": "true"} ))
dg_connection = deepgram.listen.asyncwebsocket.v("1")
options: LiveOptions = LiveOptions( model="nova-2-general", smart_format=True, punctuate=True, encoding="linear16", channels=1, sample_rate=8000, vad_events=True, )
dg_connection.start(options=options)
Observe the error: TypeError: got an unexpected keyword argument 'extra_headers'.
Expected behavior
The connection should be established successfully without any errors when using WebSocket version 14.0, similar to the behavior with version 13.1.
Please tell us about your environment
MacOS 14.6.1
python version v3.12.6