tom-s / speak-tts

76 stars 19 forks source link

Error setting voice. The voice you passed is not valid or the voices have not been loaded yet. #30

Open thebilljustin opened 2 years ago

mircealungu commented 1 year ago

same here: it happens when you're passing a

i.e., this works:

      this.speech.setVoice(randomVoice.name);

and this raises the above error:

      this.speech.setVoice(randomVoice);

in the context in which: randomVoice when logged in the console is:

SpeechSynthesisVoice {voiceURI: 'Amelie', name: 'Amelie', lang: 'fr-CA', localService: true, default: false}