Currently we are try to develop a one to one speaking avatar. I want to start speech recognition when the avatar stops saying. Currently we get a durationMs time when we call the streaming.task API with the text. It gives us the information of how much time will it take for AI avatar to speak the sentence.
By using setTineout i try to resumeSpeechRecognition after durationMs sent from the API
setTimeout(async () => { await resumeSpeechRecognition(); }, data.data?.durationMs);
But I saw that due to initial delay in the start of speaking of avatar. The speech recognition library starts working earlier. Is there any way to get an event when the avatar gets the video and starts or stops speaking.
Currently we are try to develop a one to one speaking avatar. I want to start speech recognition when the avatar stops saying. Currently we get a durationMs time when we call the streaming.task API with the text. It gives us the information of how much time will it take for AI avatar to speak the sentence.
By using setTineout i try to resumeSpeechRecognition after durationMs sent from the API
setTimeout(async () => { await resumeSpeechRecognition(); }, data.data?.durationMs);
But I saw that due to initial delay in the start of speaking of avatar. The speech recognition library starts working earlier. Is there any way to get an event when the avatar gets the video and starts or stops speaking.