so I have an iframe video in my html code
<iframe width="420" height="345" id="my video" src="testvid.mp4">
In my javascript code I am using the Webkitspeech api to detect English in real-time. Here is the code logic. https://developers.google.com/web/updates/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API
var recognition = new webkitSpeechRecognition();
recognition.continuous = true;
recognition.interimResults = true;
recognition.onstart = function() { ... }
recognition.onresult = function(event) {
var interim_transcript = '';
for (var i = event.resultIndex; i < event.results.length; ++i) {
if (event.results[i].isFinal) {
final_transcript += event.results[i][0].transcript;
} else {
interim_transcript += event.results[i][0].transcript;
}
}
final_transcript = capitalize(final_transcript);
final_span.innerHTML = linebreak(final_transcript);
interim_span.innerHTML = linebreak(interim_transcript);
};
}
recognition.onerror = function(event) { ... }
recognition.onend = function() { ... }
The PROBLEM is that this recognition API is great for detecting all sounds being emitted to the browser such as the user's mic but..... What I WANT is to have this "recognition" function ONLY detect audio from the iframe video. Is it possible to do this with the Webkitspeech api? Or is there another api I need to use? A Code example would be greatly appreciated. Thank you all!