Fix WebSocket reconnection races and Inworld TTS context restore#3591
Fix WebSocket reconnection races and Inworld TTS context restore#3591hwuiwon wants to merge 3 commits intopipecat-ai:mainfrom
Conversation
|
@markbackman @cshape would appreciate a review! |
Codecov Report❌ Patch coverage is
... and 24 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@hwuiwon we haven't seen this case. We've also just made changes to the WebsocketService to make it more robust to reconnects. I'm hesitant to make further changes for this release unless we have a documented issue and repro case that occurs on |
|
@markbackman I’ve been seeing multiple cases like #3538 (comment) while running hundreds of calls through the Inworld WebSocket service. It doesn’t happen consistently, but it reliably shows up under higher call volume. I would suggest making 1000+ calls that uses inworld websocket service to reproduce this. Not so sure how testing is set up for testing this service in particular from pipecat side. It is critical because this prevents the speech from getting generated and users won't get any feedbacks. |
Have you been running from |
|
I don't believe it's the configuration issue with Inworld because it works normally with the http service. I can rollback the changes in the |
I think this is worth a try. I noticed that Cartesia doesn't have a separate CreateContext message because they expect the configs in every message. On the other hand, 11lab might also not necessitate a createContext message because a lot of configs were already sent as part of query params in the URL. In the case of Inworld, on Websocket reconnection, it's important to re create a context first |
|
@markbackman rolled back the changes in |
This PR improves reliability for websocket-based services during transient disconnects.
healthy (reduces “reconnect attempt aborted / unable to reconnect” races).
contextId, and only close_context / clear contextId on intentional disconnects (helps prevent “connected but no
audio / context missing” after reconnects).