Multiple sayText() instructions on mobile are not queued and will overwrite each other.
As per title, the implementation of sayText() on mobile devices is slightly broken.
Multiple sayText() are supposed to queue the text, desktop browsers behave exactly as written on the documentation, mobile devices struggle to queue the lines in the correct order.
To reproduce the bug:
1. Navigate on API example with a mobile device: http://www.oddcast.com/support1/tts_limit.html
2. Click "sing a song"
Expected result:
The 5 TTS strings should be played back in order.
Result:
TTS comes in on a random order, sometimes with overlapping audios, sometimes breaks after 2 times it gets played.
Tested on:
Chrome / Android 9
Chrome / Android 10
Answer
Hi Luigi -
There is a playback setting "interrupt mode" which you can control via the API.
Check out the API function setStatus, and see relevant technical example on support page to learn more.
When you set "interrupt mode" to OFF then audios are queued.
Please see -
http://www.oddcast.com/support1/setstatus.html
Hope this helps,
Gil
Hello Gil,
no luck even if I use the interrupt mode on OFF on mobile the last sayText always overwrites the previous ones.
The current setup is pretty much that way, in the real world I load the TTS lines from a JSON file (which sometimes might contain more than 900 characters and it gets split into different lines), then fed into a for loop which works on desktop but not for mobile.
setStatus(0, 0, 0); // Example, real lines are coming from a json file var lines = [ '<s>Very very very long line of almost 900 character</s>', '<s>Another very very long line of about 700 characters</s>', '<s>Short line of 100 characters or so</s>', ]; for (var i = 0; i < lines.length; i++) { var thisLine = lines[i]; sayText(thisLine, 4, 1, 3); }
Any clue?
Thanks
Hi Luigi -
Looking into it. Can you provide a link to your test page where this problem can be seen?
Send me an email if you can.
Thanx
Luigi -
This has been passed on to engineering - we'll be looking at this early next week, I'll let you know.
Regards,
Gil
Luigi - we believe we have a resolution for this problem - currently scheduled to be deployed to our production servers on Monday morning. I will let you know when deployed.
Luigi - we've deployed an update which we believe resolves the problem.
Please check and let me know if you still see a problem.
Best to clear browser cache before testing.
Regards
Gil
Hello Gil,
I can put up a quick demo page later today but the quickest I can show you it's from your documentation site: http://www.oddcast.com/support1/tts_limit.html
The song doesn't start from the correct line if played on Android/Chrome, we're facing the same issue on iOS.
Thank you
Customer support service by UserEcho
Luigi - we've deployed an update which we believe resolves the problem.
Please check and let me know if you still see a problem.
Best to clear browser cache before testing.
Regards
Gil