6 window
.getFirstTranscript = function() {
7 var rs
= window
.results
;
8 if (!rs
|| !rs
.length
) { return 'NOTFOUND'; }
10 if (!r
.length
) { return 'NOTFOUND'; }
11 return r
.item(0).transcript
;
14 window
.testSpeechRecognition = function() {
15 var reco
= new webkitSpeechRecognition();
16 reco
.continuous
= true;
17 reco
.onresult = function(e
) {
19 document
.title
= 'PASS';
20 window
.results
= e
.results
;
22 document
.title
= 'FAIL';
25 reco
.onerror = function(e
) {
26 document
.title
= 'FAIL';
31 document
.title
= 'FAIL';