Discussions
Avatar doesn't stop talking
last year by becca
I am implementing the avatar using the react sdk and I cannot get it to register that it's being interrupted while talking. I have tried to add in the stop functionality given in the documentation as such,
avatarRef.current.on(StreamingEvents.AVATAR_STOP_TALKING, (e) => {
console.log("Avatar stopped talking");
dispatch(stopSpeaking()); //tells the avatar to stop
dispatch(setAvatarScript('')); //clear out the speaking data
});
and I cannot get it to work this way either:
//stop the avatar from speaking
const handleStopClick = () => {
console.log("avatar stopped");
avatarRef.current.stopAvatar();
};