lundi 23 mars 2015

Is it possible to Highlight each word spoken in a sentence with Web Speech API

Looking at the documentation there seems to be no method of capturing the word about to be spoken, and so being able to BOLD it, so its easy to follow for children.


REF: http://ift.tt/UlEtPd


This is the code I am using:



var u = new SpeechSynthesisUtterance();
u.text = element.innerHTML;
u.lang = 'en-UK';
u.rate = 1;
speechSynthesis.speak(u);
element.innerHTML = "This is a test text sentence.";


While reading the text out, I would like each word to be bold, and then normal. i.e.:



This is a test text sentence



Has anyone been able to achieve this?


Aucun commentaire:

Enregistrer un commentaire