Skip to content

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

Open
@ANDRE4744

Description

@ANDRE4744

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions