Discussions
LiveAvatar Transcription Event is firing very late while reading the sentence despite using speak_text (repeat functionality)
2 months ago by Techo Company
In the documentation it was mentioned that "When calling avatar.speak_text, we will immediately emit this event and avatar.transcription_ended with the input text.".
However using the SDK only "avatar.transcription" fires at the end of the sentence the avatar is currently reading.
We need to use the "transcription" when the LiveAvatar start reading the sentence not finish reading it.
controller.on(
AgentEventsEnum.AVATAR_TRANSCRIPTION,
handleAvatarTalkingMessage
);
const handleAvatarTalkingMessage = (
event: AgentEventData<AgentEventsEnum.AVATAR_TRANSCRIPTION, { event_id: string, event_type:string ,text: string }>
) => {
console.log("AVATAR EVENT TEST: TRANSCRIPTION: ", event)
dispatch(setCurrentTalkingSentence(event.text));
};