MikeyParton / react-speech-kit

React hooks for Speech Recognition and Speech Synthesis
https://mikeyparton.github.io/react-speech-kit
238 stars 63 forks source link

There seem to be only 2 voice options available. #45

Open anomaly-fr opened 3 years ago

anomaly-fr commented 3 years ago

I'm trying to switch to the Google UK Female voice but it doesn't work. Some clarity on how to change the voice would be appreciated.

paulm17 commented 2 years ago

Solved it:

    const { speak, voices, supported } = useSpeechSynthesis()
    const voice = voices[48] || null

    speak({
      voice,
      text,
    })