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src/mumble.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*!*\r\n * mumble.js v1.0.1\r\n * https://github.com/swemaniac/mumble\r\n *\r\n * A simple framework for adding voice commands to a web site using the web speech recognition API.\r\n * Supports the CommonJs/node.js/AMD and global syntax.\r\n *\r\n * See https://github.com/swemaniac/mumble for a readme and some examples.\r\n * Forked from and inspired by https://github.com/TalAter/annyang.\r\n */\r\n\r\n/**\r\n * Definition of a speech callback.\r\n *\r\n * @callback SpeechCallback\r\n * @param {event} event The original event object.\r\n */\r\n\r\n/**\r\n * Definition of a command object.\r\n *\r\n * @typedef {object} Command\r\n *\r\n * @property {string} name The command identifier.\r\n * @property {string|RegExp} command The command in regex form (can be string or object).\r\n * @property {function} action A callback that will be run when the command matches speech with the matched parameters.\r\n */\r\n\r\n/**\r\n * Definition of an options object.\r\n *\r\n * @typedef {object} Options\r\n *\r\n * @property {string} [language=en-US] A 4-letter language code, e.g. en-US.\r\n * @property {boolean} [autoRestart=true] Whether to allow auto restarting the speech recognizer.\r\n * @property {boolean} [continuous] Whether the speech recognizer should act as a dictation device.\r\n * @property {integer} [maxAlternatives=5] The max number of alternative transcripts from the speech recognizer (defaults to 5).\r\n * @property {boolean} [debug=false] Whether to enable debug logging.\r\n * @property {Command[]} [commands] An array of commands, can also be added with addCommand().\r\n * @property {SpeechCallback[]} [callbacks] An object describing various callbacks to events (start, end, speech, recognizeMatch, recognizeNoMatch, error).\r\n */\r\n\r\n(function(name, definition) {\r\n\tif (typeof module != 'undefined') module.exports = definition();\r\n\telse if (typeof define == 'function' && typeof define.amd == 'object') define(definition);\r\n\telse this[name] = definition();\r\n}('Mumble',\r\n\t/**\r\n\t * Module mumble.\r\n\t * @module mumble\r\n\t */\r\n\tfunction() {\r\n\t\t\"use strict\";\r\n\r\n\t\t/**\r\n\t\t * Module entrypoint/constructor.\r\n\t\t *\r\n\t\t * @constructor\r\n\t\t * @alias module:mumble\r\n\t\t *\r\n\t\t * @param {Options} options An options object.\r\n\t\t */\r\n\t\tvar Mumble = function(options) {\r\n\t\t\tvar _recognizer = null;\r\n\t\t\tvar _startTime = 0;\r\n\t\t\tvar _aborted = false;\r\n\t\t\tvar _commands = [];\r\n\r\n\t\t\tvar _options = {\r\n\t\t\t\tlanguage: 'en-US',\r\n\t\t\t\tautoRestart: true,\r\n\t\t\t\tcontinuous: window.location.protocol === 'http:',\r\n\t\t\t\tmaxAlternatives: 5,\r\n\t\t\t\tdebug: false,\r\n\r\n\t\t\t\tcommands: [\r\n\r\n\t\t\t\t],\r\n\r\n\t\t\t\tcallbacks: {\r\n\t\t\t\t\tstart: null,\r\n\t\t\t\t\tend: null,\r\n\t\t\t\t\tspeech: null,\r\n\t\t\t\t\trecognizeMatch: null,\r\n\t\t\t\t\trecognizeNoMatch: null,\r\n\t\t\t\t\terror: null\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tvar _self = this;\r\n\r\n\t\t\t/**\r\n\t\t\t * Call to start listening for speech.\r\n\t\t\t * @throws If the SpeechRecognition object wasn't supported.\r\n\t\t\t */\r\n\t\t\tthis.start = function() {\r\n\t\t\t\tif (!this.isAvailable()) {\r\n\t\t\t\t\tthrow 'Speech recognition not supported in this browser';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t_aborted = false;\r\n\t\t\t\t_startTime = new Date().getTime();\r\n\r\n\t\t\t\t_log('Starting with %d command(s) active', _commands.length);\r\n\r\n\t\t\t\t_recognizer.start();\r\n\t\t\t};\r\n\r\n\t\t\t/**\r\n\t\t\t * Call to stop listening for speech.\r\n\t\t\t */\r\n\t\t\tthis.stop = function() {\r\n\t\t\t\tif (this.isAvailable()) {\r\n\t\t\t\t\t_aborted = true;\r\n\t\t\t\t\t_recognizer.abort();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t/**\r\n\t\t\t * Check if the SpeechRecognition object is supported.\r\n\t\t\t * @return {boolean}\r\n\t\t\t */\r\n\t\t\tthis.isAvailable = function() {\r\n\t\t\t\treturn !!_recognizer;\r\n\t\t\t};\r\n\r\n\t\t\t/**\r\n\t\t\t * Gets a reference to the SpeechRecognition object.\r\n\t\t\t * @return {SpeechRecognition}\r\n\t\t\t */\r\n\t\t\tthis.getSpeechRecognitionObject = function() {\r\n\t\t\t\treturn _recognizer;\r\n\t\t\t};\r\n\r\n\t\t\t/**\r\n\t\t\t * Adds a command.\r\n\t\t\t *\r\n\t\t\t * The command syntax can be a string with or without any regex instructions,\r\n\t\t\t * or a RegExp object. Either way it will be converted to a RegExp object with\r\n\t\t\t * the ignoreCase flag set.\r\n\t\t\t *\r\n\t\t\t * **Example**\r\n\t\t\t *\r\n\t\t\t * `addCommand('appointment', /^book (.+) for me (today|tomorrow) at (\\d+)$/, function(appointment, date, hour) { })`\r\n\t\t\t *\r\n\t\t\t * @param {string} name A command identifier.\r\n\t\t\t * @param {string|RegExp} command The command in regex form (can be string or object).\r\n\t\t\t * @param {function} action A callback that will be run when the command matches speech.\r\n\t\t\t *\r\n\t\t\t * @throws If a command with the same name already exists.\r\n\t\t\t */\r\n\t\t\tthis.addCommand = function(name, command, action) {\r\n\t\t\t\tif (this.getCommand(name)) {\r\n\t\t\t\t\tthrow 'Command \"' + name + '\"\" already exists';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// wrap the command in a RegExp object with the ignoreCase flag\r\n\t\t\t\tvar commandSrc = typeof(command) == 'string' ? ('^' + command + '$') : command.source;\r\n\t\t\t\tvar commandExp = new RegExp(commandSrc, 'i');\r\n\r\n\t\t\t\t_commands.push({\r\n\t\t\t\t\tname: name,\r\n\t\t\t\t\tcommand: commandExp,\r\n\t\t\t\t\taction: action\r\n\t\t\t\t});\r\n\r\n\t\t\t\t_log('Added command: \"%s\", %s', name, commandExp);\r\n\t\t\t};\r\n\r\n\t\t\t/**\r\n\t\t\t * Removes a command.\r\n\t\t\t * @param {string} name The command identifier.\r\n\t\t\t */\r\n\t\t\tthis.removeCommand = function(name) {\r\n\t\t\t\tvar foundIndex = -1;\r\n\r\n\t\t\t\t_commands.some(function(command, index) {\r\n\t\t\t\t\tif (command.name == name) {\r\n\t\t\t\t\t\tfoundIndex = index;\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (foundIndex >= 0) {\r\n\t\t\t\t\tdelete _commands[foundIndex];\r\n\t\t\t\t\t_log('Removed command \"%s\"', name);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t/**\r\n\t\t\t * Gets a previously added command.\r\n\t\t\t *\r\n\t\t\t * @param {string} name A command identifier.\r\n\t\t\t * @return {Command} A command.\r\n\t\t\t */\r\n\t\t\tthis.getCommand = function(name) {\r\n\t\t\t\tvar found = null;\r\n\r\n\t\t\t\t_commands.some(function(command) {\r\n\t\t\t\t\tif (command.name == name) {\r\n\t\t\t\t\t\tfound = command;\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn found;\r\n\t\t\t};\r\n\r\n\t\t\t/**\r\n\t\t\t * Sets the language of the speech recognizer.\r\n\t\t\t * @param {string} language A 4 letter language code (e.g. en-US).\r\n\t\t\t */\r\n\t\t\tthis.setLanguage = function(language) {\r\n\t\t\t\t_options.language = language;\r\n\r\n\t\t\t\tif (this.isAvailable()) {\r\n\t\t\t\t\t_recognizer.lang = _options.language;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t/**\r\n\t\t\t * Sets whether the speech recognizer should be auto restarted\r\n\t\t\t * after an \"end\" event.\r\n\t\t\t *\r\n\t\t\t * @param {boolean} autoRestart\r\n\t\t\t */\r\n\t\t\tthis.setAutoRestart = function(autoRestart) {\r\n\t\t\t\t_options.autoRestart = !!autoRestart;\r\n\t\t\t};\r\n\r\n\t\t\t/**\r\n\t\t\t * Sets the max number of alternative transcripts that the\r\n\t\t\t * speech recognizer should return.\r\n\t\t\t *\r\n\t\t\t * Mumble will try to match a command to each of these transcripts.\r\n\t\t\t *\r\n\t\t\t * @param {integer} maxAlternatives\r\n\t\t\t */\r\n\t\t\tthis.setMaxAlternatives = function(maxAlternatives) {\r\n\t\t\t\t_options.maxAlternatives = parseInt(maxAlternatives);\r\n\r\n\t\t\t\tif (this.isAvailable()) {\r\n\t\t\t\t\t_recognizer.maxAlternatives = _options.maxAlternatives;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t/**\r\n\t\t\t * Sets whether the speech recognizer should act as a dictation device or\r\n\t\t\t * a one-shot command device.\r\n\t\t\t *\r\n\t\t\t * In HTTPS, turn off continuous mode for faster results.\r\n\t\t\t * In HTTP, turn on continuous mode for much slower results, but no repeating security notices.\r\n\t\t\t *\r\n\t\t\t * @param {boolean} continuous The mode of the speech recognizer.\r\n\t\t\t */\r\n\t\t\tthis.setContinuous = function(continuous) {\r\n\t\t\t\t_options.continuous = !!continuous;\r\n\r\n\t\t\t\tif (this.isAvailable()) {\r\n\t\t\t\t\t_recognizer.continuous = _options.continuous;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t/**\r\n\t\t\t * Enables or disabled debug logging to the console.\r\n\t\t\t * @param {boolean} debug\r\n\t\t\t */\r\n\t\t\tthis.setDebug = function(debug) {\r\n\t\t\t\t_options.debug = !!debug;\r\n\t\t\t};\r\n\r\n\t\t\tfunction _init(options) {\r\n\t\t\t\t_recognizer = _getRecognizerObject();\r\n\r\n\t\t\t\tif (!_self.isAvailable()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// merge default options with user options\r\n\t\t\t\tif (options) {\r\n\t\t\t\t\tfor (var opt in _options) {\r\n\t\t\t\t\t\tif (options[opt]) {\r\n\t\t\t\t\t\t\t_options[opt] = options[opt];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t_self.setLanguage(_options.language);\r\n\t\t\t\t_self.setContinuous(_options.continuous);\r\n\t\t\t\t_self.setAutoRestart(_options.autoRestart);\r\n\t\t\t\t_self.setMaxAlternatives(_options.maxAlternatives);\r\n\t\t\t\t_self.setDebug(_options.debug);\r\n\r\n\t\t\t\t// add commands\r\n\t\t\t\t_options.commands.forEach(function(command) {\r\n\t\t\t\t\t_self.addCommand(command.name, command.command, command.action);\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// set callbacks\r\n\t\t\t\t_recognizer.onstart = _onStart;\r\n\t\t\t\t_recognizer.onend = _onEnd;\r\n\t\t\t\t_recognizer.onerror = _onError;\r\n\t\t\t\t_recognizer.onresult = _onResult;\r\n\t\t\t}\r\n\r\n\t\t\tfunction _onStart(event) {\r\n\t\t\t\t_log('Start listening..', event, _options);\r\n\t\t\t\t_callback(_options.callbacks.start, event, _self);\r\n\t\t\t}\r\n\r\n\t\t\tfunction _onEnd(event) {\r\n\t\t\t\t_log('Stop listening..', event);\r\n\t\t\t\t_callback(_options.callbacks.end, event, _self);\r\n\r\n\t\t\t\tif (_options.autoRestart && !_aborted) {\r\n\t\t\t\t\t_log('(Auto-restarting)');\r\n\r\n\t\t\t\t\tvar timeSinceLastStarted = new Date().getTime() - _startTime;\r\n\r\n\t\t\t\t\t// allow at least 1s between restarts\r\n\t\t\t\t\tif (timeSinceLastStarted < 1000) {\r\n\t\t\t\t\t\tsetTimeout(_self.start, 1000 - timeSinceLastStarted);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t_self.start();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _onError(event) {\r\n\t\t\t\t_log('Error occurred', event);\r\n\t\t\t\t_callback(_options.callbacks.error, event, _self);\r\n\r\n\t\t\t\tif (['not-allowed', 'service-not-allowed'].indexOf(event.error) !== -1) {\r\n\t\t\t\t\t_self.setAutoRestart(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _onResult(event) {\r\n\t\t\t\t_log('Got result', event);\r\n\t\t\t\t_callback(_options.callbacks.speech, event, _self);\r\n\r\n\t\t\t\tvar results = event.results[event.resultIndex];\r\n\t\t\t\tvar matchFound = false;\r\n\r\n\t\t\t\t// loop through the transcription results\r\n\t\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t\tvar result = results[i];\r\n\t\t\t\t\tvar transcript = result.transcript.trim();\r\n\r\n\t\t\t\t\t_log('Recognized: \"%s\"', transcript);\r\n\r\n\t\t\t\t\t// check each command against the transcript, halting on the first match\r\n\t\t\t\t\tmatchFound = _commands.some(function(command) {\r\n\t\t\t\t\t\tvar match = command.command.exec(transcript);\r\n\r\n\t\t\t\t\t\t// we got a match\r\n\t\t\t\t\t\tif (match) {\r\n\t\t\t\t\t\t\tvar parameters = match.slice(1);\r\n\r\n\t\t\t\t\t\t\t_log('Command matched: \"%s\", %s', command.name, command.command, parameters);\r\n\r\n\t\t\t\t\t\t\t// call the generic callback and the command action with any possible parameters from the regex\r\n\t\t\t\t\t\t\t_callback(_options.callbacks.recognizeMatch, event, _self);\r\n\t\t\t\t\t\t\tcommand.action.apply(_self, parameters);\r\n\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t// don't go through the rest of the commands on a match\r\n\t\t\t\t\tif (matchFound) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!matchFound) {\r\n\t\t\t\t\t_callback(_options.callbacks.recognizeNoMatch, event, _self);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn matchFound;\r\n\t\t\t}\r\n\r\n\t\t\tfunction _callback(callback, event, context) {\r\n\t\t\t\tif (typeof(callback) == 'function') {\r\n\t\t\t\t\tcallback.call(context, event);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction _getRecognizerObject() {\r\n\t\t\t\tvar SpeechRecognizer = window.SpeechRecognition ||\r\n\t\t\t\t\t\t\t\t\twindow.webkitSpeechRecognition ||\r\n\t\t\t\t\t\t\t\t\twindow.mozSpeechRecognition ||\r\n\t\t\t\t\t\t\t\t\twindow.msSpeechRecognition ||\r\n\t\t\t\t\t\t\t\t\twindow.oSpeechRecognition;\r\n\r\n\t\t\t\tif (SpeechRecognizer) {\r\n\t\t\t\t\treturn new SpeechRecognizer();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t_log('SpeechRecognition object not supported');\r\n\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tfunction _log() {\r\n\t\t\t\tif (!!_options.debug) {\r\n\t\t\t\t\tvar out = window.console || { log: function() { } };\r\n\t\t\t\t\tout.log.apply(out, arguments);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t_init(options);\r\n\t\t};\r\n\r\n\t\treturn Mumble;\r\n\t}\r\n));"]}