Skip to content

Commit c27ccd8

Browse files
authored
Merge pull request #15 from akashraj9828/master
more api added
2 parents 68014a5 + 753f1e8 commit c27ccd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/p5.speech.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243

244244
// make a recognizer object.
245245
if('webkitSpeechRecognition' in window) {
246-
this.rec = new webkitSpeechRecognition();
246+
this.rec = new (window.SpeechRecognition || window.webkitSpeechRecognition || window.mozSpeechRecognition || window.msSpeechRecognition)();
247247
}
248248
else {
249249
this.rec = new Object();
@@ -292,8 +292,8 @@
292292
// speech recognition system successfully connected to and received
293293
// a response from the server. you can construct an if() around this
294294
// if you're feeling worried.
295-
this.resultValue;
296-
// resultValue:
295+
this.resultValue;
296+
// resultString:
297297
// the 'transcript' of the most recently recognized speech as a simple
298298
// string. this will be blown out and replaced at every firing of the
299299
// onresult() callback.

0 commit comments

Comments
 (0)