Closed willnix86 closed 4 years ago
I should say, I don't get an error saying "can't set voice" like your code dictates I would if the action fails - it's very strange!!
Hi,
Could you please please provide an example (jsfiddle or codesandbox) that reproduces the issue ?
Also have you checked that the voice you are providing exist in the list of available voices returned at init time ? Same question for the language. The fact that it works on your desktop it not a proof that it should work on your iphone, each device/os has different voices and languages.
Hi @tom-s - yeah I've checked that the voices that show up on iPhone are the iPhone specific ones.
Here's a codesandbox with the issue replicated: https://codesandbox.io/s/5wpqlyv25l
Looking forward to hearing your thoughts!
Any ideas, @tom-s?
Looks like a bug on ios 12, is it what you are using? -> https://stackoverflow.com/questions/53114919/speechsynthesis-cannot-set-voice-on-ios-devices
I've found that the same code that changes all voices correctly on my laptop, doesn't do the same on my iPhone.
On the iPhone, it'll change to the default voice for any language (ie. if i choose a voice listed for that language, it'll set a new voice), but if I try to change the voice to another from that language, I have no luck - it just stays the same. For e.g: there are 3 voices that show up for en-US but even if I change to another of the 3, the voice doesn't change from the default en-US voice.
Below is my code. The "voice" being passed to it is just a string ie. "Alex" or "Daniel" which should set the new voice as needed (as I said, it certainly does on my laptop). Any thoughts?
I know the 'speech' object I call setVoice on works because whatever happens, it speaks "Hello, I'm xxx' as I've told it to
componentDidUpdate(prevProps) {
}