Thanks for the quick response!
We had actually tried using the queue mechanism before, but that’s where some of our issues originated. Occasionally, the second or third AudioResponse
arrives with a delay, causing the queue count to reach zero before all response parts have been received. As a result, isTalking
gets set to false
too early.
That said, your second suggestion pointed us in the right direction. While ProcessUserQuery
isn’t suitable for our case—since it deals with user input rather than AI responses—we applied a similar approach to the AudioResponse
.
We’re now using the OnResultReceived
event from the ConvaiGRPCAPI
class, checking for the EndOfResponse
flag in the AudioResponse
field returned by the callback. At the same time, we monitor the OnCharacterTalkingChanged
event from the ConvaiNPCAudioManager
, but only set the character to not talking on our side if we’ve already received the EndOfResponse
.
This seems to produce the desired behavior so far.