juanmc2005 / diart

A python package to build AI-powered real-time audio applications
https://diart.readthedocs.io
MIT License
1.09k stars 91 forks source link

Support multiple client connections over Websocket #252

Open janaab11 opened 5 days ago

janaab11 commented 5 days ago

Looked at the WebSocketAudioSource class to realise that the server will only support one client at a time. Also leads to this weird (but expected, i guess) behaviour - when two clients connect sequentially, the later one has response offsets that carry over from the first one.

I can see a way to add multi-client support - happy to make a PR - but wondering if this choice is intentional? And if i am missing something?

New here, and really appreciate the detail and thought that has gone into this work already!