Skip to content

Speak function calls continously on onEnd #68

Description

@naonvl

I'm calling the speak function on onEnd function from useSpeechRecognition like this

  const onEnd = () => {
    fetch(
      "http://api/Main?id=test&lang=kor&req=" +
        value,
      {}
    )
      .then((res) => res.json())
      .then(
        (result) => {
          setResponse(result.res);
          speak({
            text: result.res,
            voices: {
              lang: "ko-KR",
            },
          });
          console.log(result);
        },
        (error) => {
          console.log(error);
        }
      );
  };

but the voice language doesn't changed to korean, also it speak continously. where did i do wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions