Discussions

Ask a Question
Back to All

Opening Prompt not speaking exact statement given

I am using library package 2.0.12

I am trying to set the Inital Prompt from speak() event after Avatar is initialized for listenting. This was working few days ago and now all of sudden it speaks different than the given words.

Here is the short snippet

export default function InteractiveAvatar({ openingPrompt }: MyComponentProps) {
  avatar.current?.on(StreamingEvents.STREAM_READY, (event) => {
		handleSpeak()
  }
	async function handleSpeak() {
	await avatar.current  
      .speak({ text: openingPrompt, taskMode: TaskMode.ASYNC  })  
      .catch((e) => {  
        setDebug(e.message);  
      });
}
}

Can you please let me know what wrong I am doing