<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[SpeechSynthesis has no voices or errors Opera 28 Android 4.4.2]]></title><description><![CDATA[<p dir="auto">window.speechSynthesis.getVoices().length returns 0</p>
<p dir="auto">Opera never triggers onvoiceschanged yet (on windows desktop) the call to speechSynthesis.speak(chat) works and after the voice invocation getVoices() now returns an array of length one. On Android I get no audio and no errors and absolutely no events <img src="https://forums.opera.com/assets/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=f58hvca1lju" class="not-responsive emoji emoji-emoji-one emoji--disappointed_face" title=":-(" alt="😞" /></p>
<p dir="auto">Please help.</p>
<p dir="auto">Cheers Richard Maher</p>
<p dir="auto">&lt;!DOCTYPE html&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;script type="text/javascript"&gt;<br />
var voices;<br />
var done = false;<br />
function fini()<br />
{<br />
alert("end");<br />
}function errorLog()<br />
{<br />
alert("error");<br />
}<br />
function talk()<br />
{<br />
if (!('speechSynthesis' in window)) {<br />
alert("Unsupported browser");<br />
return;<br />
}<br />
alert("Count is "+speechSynthesis.getVoices().length);</p>
<pre><code>try {
    speechSynthesis.onvoiceschanged = function() {
    voices = window.speechSynthesis.getVoices();
    alert("Voices " + voices.length);
    if (!done) theWork();
    };
    voices = speechSynthesis.getVoices();
    if (voices.length != 0) theWork();
} catch (err) {alert("0");alert(err.description||err.message);}
alert("Hello");
</code></pre>
<p dir="auto">}</p>
<p dir="auto">function theWork()<br />
{<br />
done = true;<br />
alert("Getting ready." + speechSynthesis.speaking + voices.length);<br />
var utterance = "Hello World";<br />
var chat;<br />
try {<br />
chat = new SpeechSynthesisUtterance(utterance);<br />
} catch (err) {alert("1");alert("new error "+ err.description||err.message);}<br />
alert("a");</p>
<pre><code>try {
chat.addEventListener('end', fini, false);
} catch (err) {alert("2");alert("AddEvent "+ err.description||err.message);}
alert("b");
try {
chat.addEventListener('error', errorLog, false);
} catch (err) {alert("3");alert("AddEvent "+ err.description||err.message);}
alert("c");
try {
chat.addEventListener('abort', errorLog, false);
} catch (err) {alert("4");alert("AddEvent "+ err.description||err.message);}
alert("d");

try {
   speechSynthesis.speak(chat);
} catch (err) {alert("5");alert("Speak "+ err.description||err.message);}
alert("e");
</code></pre>
<p dir="auto">}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;</p>
<p dir="auto">On Safari this example won't fire any known events</p>
<p dir="auto">onend, onerror, even onended: -</p>
<p dir="auto">&lt;input type="button" value="Talk" onclick="talk()" /&gt;</p>
<p dir="auto">No probs on Chrome or Opera. Spewin!<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
]]></description><link>https://forums.opera.com/topic/9016/speechsynthesis-has-no-voices-or-errors-opera-28-android-4-4-2</link><generator>RSS for Node</generator><lastBuildDate>Thu, 12 Mar 2026 04:48:41 GMT</lastBuildDate><atom:link href="https://forums.opera.com/topic/9016.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 03 Apr 2015 00:50:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SpeechSynthesis has no voices or errors Opera 28 Android 4.4.2 on Fri, 03 Apr 2015 06:09:45 GMT]]></title><description><![CDATA[<p dir="auto">Here's the best strategy I can come up with as Opera is small beer and I have to get on to speech Recognition: -</p>
<blockquote></blockquote>
<p dir="auto">The first getVoices() tells Opera to swing into action.<br />
Opera needs you to release the thread so it can get the voices info<br />
Opera will not honour/deliver the onvoiceschanged event.<br />
I stick a setTimout(myvoicesHandler,0) in there.<br />
If the handler gets voices it updates the selections else it stays at zero<br />
the feature detection has to move way down into the code</p>
<blockquote></blockquote>
<p dir="auto">But why are there no voices on Opera 28 Android 4.4.2?</p>
]]></description><link>https://forums.opera.com/post/71080</link><guid isPermaLink="true">https://forums.opera.com/post/71080</guid><dc:creator><![CDATA[maherrj]]></dc:creator><pubDate>Fri, 03 Apr 2015 06:09:45 GMT</pubDate></item></channel></rss>