I have SpeechSynthesisUtterance working in my native language (English) but I need to set the language to Italian for correct pronunciation.
The code works correctly in Mac Safari but in iOS Safari the pronunciation is English not Italian.
An easy test is the Italian: "Ho i soldi", "h"is silent in Italian.
<!DOCTYPE html><html lang='en' class=''>
<head><meta charset='UTF-8'></head>
<body>
<button id="Ho una prenotazione." onclick=speak(id)>Ho una prenotazione.</button>
I have a reservation
<script >
function speak(text) {
var msg = new SpeechSynthesisUtterance(text);
msg.lang = 'it-IT';
window.speechSynthesis.speak(msg);
}
</script>
</body></html>
Here is a test example of the above code.
I have downloaded Italian "Luca" and have set it as the Default at Settings:General:Accessibility:Speech:Voices:Italian;Luca
I have posted an inquiry to the Apple Safari and Web Development Forum on Jul 26, 2018 with the result of no response to date: (422 Views, 0 Replies).
I have also submitted an Apple Developer Technical Support (DTS) request August 16, 2018 that was declined with a suggestion to post to the Web Development Forum.
This while this might be deemed off-topic please consider I have tried debugging and requested help from Apple which has been ignored and denied.
Thus seems to be an iOS beta issue, even the Chrome and Firefox apps has the English pronunciation. I have files a Beta bug report on this issue.
I have to little rep to post this in the comments so i will post it as an answer. I see that you are running iphone 6s, but i tried it on my iphone X and on my Mac with both english and italian in different browsers.
There is a possibility that the problem persists within your phone or os because it seems to work perfect on my devices, have you tried any other devices than your iphone 6s?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With