agents
agents copied to clipboard
Elevenlabs TTS websocket connection design
Hi,
I was able to make the minimal_assistant.py implementation work. Once I sorted out all the difficulties, it runs pretty well! Kudos for that 😃.
I have a question regarding the WebSocket connections used in the ElevenLabs TTS module. In my environment, I noticed that the WebSocket creation is being triggered every time the agent responds to the user. Consequently, the WebSocket is being closed every time the agent stops talking.
Questions:
-
Is this a design decision? If so, could you please explain the rationale behind it?
-
Is there a specific reason for not maintaining a persistent WebSocket connection throughout the session?
I believe closing and reopening the WebSocket repeatedly introduces unnecessary overhead. Maintaining one or a few stable connections throughout the session might be more efficient.
Looking forward to your insights on this.
Thank you!