mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 09:58:39 +00:00
Add better test
This commit is contained in:
parent
a78d931a85
commit
5aa746a72d
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
jsOMS.UI.Input.Voice.VoiceManager.prototype.setup = function()
|
||||
{
|
||||
let self = this;
|
||||
const self = this;
|
||||
|
||||
this.recognition.lang = this.lang;
|
||||
this.recognition.interimResults = false;
|
||||
|
|
@ -51,6 +51,10 @@
|
|||
|
||||
this.recognition.onresult = function(event) {
|
||||
console.log(event.results[event.resultIndex][0].transcript);
|
||||
|
||||
if(self.commands.hasOwnProperty(event.results[event.resultIndex][0].transcript)) {
|
||||
self.commands[event.results[event.resultIndex][0].transcript]();
|
||||
}
|
||||
}
|
||||
|
||||
this.recognition.onspeechend = function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user