web speech listener

0

I have the following schedule. It writes in the input the text4 and the text5 by the corresponding button.

I wanted to do automatic, that is, when I started input, via text4, the listen4 () function itself would open the MIC5 as the button does. Finally in this function I call the listen5 () function. But this does not happen. I need help with this.

<button class="btn" onclick="listen4()">MIC
4:</button>
<input id="text4">
..............................
<button class="btn" onclick="listen5()">MIC
5:</button>
<input id="text5">
........................
function listen4() {
listener.listen("pt", function(text4) {
document.getElementById("text4").value = text4 ; nota4 = document.getElementById("text4").value; speaker.speak("pt", nota4);listen5();})}
..................................................

function listen5() {
listener.listen("pt", function(text4) {
document.getElementById("text5").value = text5 ; nota5 = document.getElementById("text5").value; speaker.speak("pt", nota5); })}
..................................................
    
asked by anonymous 15.06.2017 / 20:32

0 answers