summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthewsotoudeh <matthewsot@outlook.com>2017-02-05 12:58:17 -0800
committermatthewsotoudeh <matthewsot@outlook.com>2017-02-05 12:58:17 -0800
commit2544220c1a0176c3a53e0b43519804cc854c1f03 (patch)
treef3e922864f1a5fbfbca5adcc1acb3c70cbdc830d
parent68b6f6ff265033e904e80450a9377fd30edca4a3 (diff)
updated abstraction
-rw-r--r--ps/sr-abstraction.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ps/sr-abstraction.js b/ps/sr-abstraction.js
index eb1a9d9..4ff9e06 100644
--- a/ps/sr-abstraction.js
+++ b/ps/sr-abstraction.js
@@ -36,19 +36,19 @@ if (typeof SpeechRecognition == "undefined" && typeof webkitSpeechRecognition ==
}
}
};
- recognition.onerror = function(e) { }
- recognition.onend = function() { }
+ speechRecognizer.recognition.onerror = function(e) { }
+ speechRecognizer.recognition.onend = function() { }
speechRecognizer.startRecognizing = function () {
try {
- recognition.start();
- } catch { }
+ speechRecognizer.recognition.start();
+ } catch (e) { }
};
speechRecognizer.stopRecognizing = function (abort) {
if (abort) {
- recognition.abort();
+ speechRecognizer.recognition.abort();
} else {
- recognition.stop();
+ speechRecognizer.recognition.stop();
}
};
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback