-
Notifications
You must be signed in to change notification settings - Fork 196
Description
Your question
While looking into #837 and the review comments I digged a bit deeper into the stack and tried to find the logic how things are wired / connected.
Besides a quite different usage between AsyncIterableQueue (and not so much StreamChannel), and loops that pick up stuff and put it on any other queue... I was looking for example at agents/src/tts/tts.ts. There are comments like
// TODO(AJS-37) Remove when refactoring TTS to use streams
// TODO (AJS-36) clean this up when we refactor with streams
the tts.ts currently uses AsyncIterableQueue with a DeferredReadableStream and some hacky mainTask approach ;-)
What I was trying to find out: I was specifically looking into the "stream end" routine. So when a calls ends, it needs to shut down everything, also "tells the tts" (of course others too, but in my case the tts is running "longer" and not just per turn), the input is closing, but somehow the propagation is not always coming till my TTS elevenlabs implementation.
so my stream remains open, the tts is never shutting down (..., instead the socket gets even reconnected on errors).
Anyways, I was thinking of simplifying the recv/send loops .e.g. by streams, and avoid some possibilities of getting stuck or forgetting to unregister/shutdown something, ... and then stumpled on this comment inside tts that I interpreted somehow similiar to my idea of using streams.
Are there any notes about this? Or can someone explain what exactly the comments are referring to? :)
Thanks
Simon