Closed github0013 closed 6 years ago
I just copied the readme example and ran it as below.
Speech.init({ 'onVoicesLoaded': (data) => {console.log('voices', data.voices)}, 'lang': 'en-US', // specify en-US language (no detection applied) 'volume': 0.5, 'rate': 0.8, 'pitch': 0.8, 'voice': 'Samantha' }) Speech.speak({text: "Samantha"}) // error ..
Instead, if I don't give voice parameter but later set the voice works fine.
voice
Speech.init({ 'onVoicesLoaded': (data) => {console.log('voices', data.voices)}, 'lang': 'en-US', // specify en-US language (no detection applied) 'volume': 0.5, 'rate': 0.8, 'pitch': 0.8 }) Speech.setVoice("Samantha") Speech.speak({text: "Samantha"})
Hi,
I have release a new version (2.0.3) which should solve the issue for you. Please note that the API has changed a bit and is now all promise-based.
env
Problem
I just copied the readme example and ran it as below.
A workaround I found... (or maybe I am not fully understand the APIs)
Instead, if I don't give
voice
parameter but later set the voice works fine.