-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Describe the bug
When you are running agent + background tasks handlers (like encouragement) if one of them starts using the avatar to speak, the other audio request essentially gets blocked off (sometimes annoying when you're chatting with debugger but suddenly it can't speak because a random roasting messages comes along LMAO)
To Reproduce
Steps to reproduce the behavior:
- Find some scenarios where two speech requests are triggered
Expected behavior
We need to implement a queue for handling speech messages, and each time someone wants to play audio it will produce a message to that queue and we will keep checking if there is message in the queue and the worker (i.e. the audio player) will consume the message. (like how people use AWS SQS)
Sounds like an overkill at first, but if you think deeply what we have is kinda like two microservices (agents vs event handlers) that are completely separated in implementation, so this seems to be the best solution.
Additional context
Add any other context about the problem here.