You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Options: No direct options, all provided options are passed to MicrophoneStream and RecognizeStream, and WritableElementStream if `options.outputElement` is set
56
+
Options:
57
+
*`keepMic`: if true, preserves the MicrophoneStream for subsequent calls, preventing additional permissions requests in Firefox
58
+
* Other options passed to MediaElementAudioStream and RecognizeStream
59
+
* Other options passed to WritableElementStream if `options.outputElement` is set
57
60
58
61
Requires the `getUserMedia` API, so limited browser compatibility (see http://caniuse.com/#search=getusermedia)
59
62
Also note that Chrome requires https (with a few exceptions for localhost and such) - see https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features
@@ -155,6 +158,10 @@ Accepts input from `RecognizeStream()` and friends, writes text to supplied `out
155
158
156
159
## Changelog
157
160
161
+
### v0.13
162
+
* Fixed bug where `continuous: false` didn't close the microphone at end of recognition
163
+
* Added `keepMic` option to `recognizeMicrophone()` to prevent multiple permission popups in firefox
164
+
158
165
### v0.12
159
166
* Added `autoPlay` option to `synthesize()`
160
167
* Added proper parameter filtering to `synthesize()`
@@ -206,3 +213,5 @@ Accepts input from `RecognizeStream()` and friends, writes text to supplied `out
206
213
* look for bug where single-word final results may omit word confidence (possibly due to FormatStream?)
207
214
* fix bug where TimingStream shows words slightly before they're spoken
208
215
* automatically turn on objectMode when required by other options (timing, confidence, etc.
216
+
* support jquery objects for element and targetElement
217
+
* add a way to keep the mic stream so the user isn't repeatedly prompted in firefox
@@ -34,6 +36,7 @@ var WritableElementStream = require('./writable-element-stream');
34
36
* @param {Object} options - Also passed to {MediaElementAudioStream} and to {RecognizeStream}
35
37
* @param {String} options.token - Auth Token - see https://github.com/watson-developer-cloud/node-sdk#authorization
36
38
* @param {Boolean} [options.format=true] - pipe the text through a {FormatStream} which performs light formatting
39
+
* @param {Boolean} [options.keepMicrophone=false] - keeps an internal reference to the microphone stream to reuse in subsequent calls (prevents multiple permissions dialogs in firefox)
37
40
* @param {String|DOMElement} [options.outputElement] pipe the text to a WriteableElementStream targeting the specified element. Also defaults objectMode to true to enable interim results.
38
41
*
39
42
* @returns {RecognizeStream}
@@ -56,17 +59,46 @@ module.exports = function recognizeMicrophone(options) {
0 commit comments