TalAter/annyang

Changing the language can cause shorter listening times on mobile

The-Linguist opened this issue · 2 comments

For those who use annyang.setLanguage(" "); to make annyang understand a language other than English.
Some of the languages (that I have tested) have no problems like Russian, Korean, Japanese and Arabic.
But some languages have this "shorter listening time" problem like Turkish, Hebrew, Latin and Indonesian.

Visit https://www.talater.com/annyang/ on a mobile device. On my devices, I see that it auto-restarts every 5 or 6 seconds with a repeating dinging notification tone each time. That is the usual listening time interval for English and some languages.
5 or 6 seconds is OK and acceptable in many cases.
But with the other unfortunate languages, that auto-restart happens almost every 1 or 2 seconds. That is a HUGE decrease in usability.
I presume, it must be an issue of Google's priority policy about development of language support.

The code below is not a real solution but instead of the built-in auto-restart I have set a manual restart function to fire every 5 seconds like this (Warning: This code is for mobile only),

annyang.start({ autoRestart: false });
var resetAnnyang = setInterval(annyangResetF, 5000);
function annyangResetF()
{  
  setTimeout(function(){ annyang.abort(); }, 1000); 
  setTimeout(function(){ annyang.start({ autoRestart: false }); }, 2000); 
  console.log("annyang is going to be off for 1 second in 1 second"); 
}

You can use clearInterval(resetAnnyang); where you want it to stop ticking.
It works as a delay adjustment but the average listening time of annyang will still be 2 seconds for the unfortunate languages like the ones mentioned above. 2 seconds is just too short of an allowed reaction time to make every user happy.
If anyone knows a better workaround, please share.

Further tests showed that the shortness of the listening time also depends on the device. In my case on an ASUS tablet it is not as bad as it is on a SONY phone, but still shorter than usual.
It would be nice to read other reports about experiences with annyang language setting and device type-model-brand.
Here is a web-app for learning Turkkishi (a.k.a. the Turkish language), http://turkcekon.us
In this web-app the language code set to annyang is "tr". You can compare the listening times to the default English on annyang's homepage or elsewhere annyang is used.