Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with WebSocket Connection in Real-time Voice Assistant Integration #44

Open
ANDRE4744 opened this issue Mar 29, 2025 · 1 comment

Comments

@ANDRE4744
Copy link

ANDRE4744 commented Mar 29, 2025

Problem:

I am facing an issue when trying to connect to OpenAI's Realtime API through WebSocket in the twilio-openai-realtime-voice-assistant project.

Error details:

  • The error occurs during the WebSocket connection initialization.
  • The specific error message is: TypeError: BaseEventLoop.create_connection() got an unexpected keyword argument 'extra_headers'.

Steps to reproduce:

  1. Clone the repository and set up the environment as instructed.
  2. Run the application using the uvicorn server.
  3. Attempt to make the WebSocket connection to OpenAI API.

Expected result:
The WebSocket connection should establish successfully, and the server should be able to send and receive audio data.

Actual result:
The connection fails with the error message mentioned above.

Additional Information:

  • The issue seems to be related to the use of extra_headers in the websockets.connect() function.
  • I am using Python 3.13 and the latest version of the websockets package.

Error log file

log.txt

I try to solve everything it won't work
i copy and make exactly in documentation but errors

@CriPstian
Copy link

I am also having issues with this project. Does not seem to work all the way.
There's a PR fixing something related to headers: #43
Try changing
extra_headers -> additional_headers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants