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
and there is also a [REST API](http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/getting_started/gs-tokens.shtml).
19
20
21
+
### Examples
20
22
See several examples at https://github.com/watson-developer-cloud/speech-javascript-sdk/tree/master/examples
21
23
22
-
This library is built with [browserify](http://browserify.org/) and easy to use in browserify-based projects (`npm install --save watson-speech`), but you can also grab the compiled bundle from the
23
-
`dist/` folder and use it as a standalone library.
24
+
### Installation - npm
24
25
25
-
Basic API
26
+
This library is built with [browserify](http://browserify.org/) and easy to use in browserify-based projects :
27
+
28
+
npm install --save watson-speech
29
+
30
+
### Installation - standalone
31
+
32
+
Pre-compiled bundles are also available from on GitHub Releases: https://github.com/watson-developer-cloud/speech-javascript-sdk/releases
33
+
34
+
API
26
35
---------
27
36
28
-
Complete API docs should be published at http://watson-developer-cloud.github.io/speech-javascript-sdk/
37
+
The basic API is outlined here, see complete API docs at http://watson-developer-cloud.github.io/speech-javascript-sdk/
29
38
30
39
All API methods require an auth token that must be [generated server-side](https://github.com/watson-developer-cloud/node-sdk#authorization).
31
40
(Snp teee examples/token-server.js for a basic example.)
@@ -43,11 +52,6 @@ Options:
43
52
* voice - the desired playback voice's name - see .getVoices(). Note that the voices are language-specific.
44
53
* autoPlay - set to false to prevent the audio from automatically playing
45
54
46
-
### `.getVoices()` -> Promise
47
-
48
-
Returns a promise that resolves to an array of objects containing the name, language, gender, and other details for each voice.
49
-
50
-
Requires[window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), a [pollyfill](https://www.npmjs.com/package/whatwg-fetch) for IE/Edge and older Chrome/Firefox.
51
55
52
56
## `WatsonSpeech.SpeechToText`
53
57
@@ -140,6 +144,7 @@ Accepts input from `RecognizeStream()` and friends, writes text to supplied `out
140
144
* Removed `SpeechToText.recognizeElement()` due to quality issues
141
145
* Added `options.element` to TextToSpeech.synthesize() to support playing through exiting elements
142
146
* Fixed a couple of bugs in the TimingStream
147
+
* Added support for STT profanity_filter & documented keywords and words_alternatives options.
143
148
144
149
### v0.14
145
150
* Moved getUserMedia shim to a [standalone library](https://www.npmjs.com/package/get-user-media-promise)
* By default, only finalized text is emitted in the data events, however in `readableObjectMode` (usually just `objectMode` when using a helper method).
40
40
*
41
-
* An interim result looks like this (assuming all features are enabled):
41
+
* Todo: add keywords, word_alternatives to examples
* @param {Boolean} [options.word_confidence=false] - include confidence scores with results. Defaults to true when in objectMode.
118
118
* @param {Boolean} [options.timestamps=false] - include timestamps with results. Defaults to true when in objectMode.
119
119
* @param {Number} [options.max_alternatives=1] - maximum number of alternative transcriptions to include. Defaults to 3 when in objectMode.
120
+
* @param {Array<String>} [options.keywords] - a list of keywords to search for in the audio
121
+
* @param {Number} [options.keywords_threshold] - Number between 0 and 1 representing the minimum confidence before including a keyword in the results. Required when options.keywords is set
122
+
* @param {Number} [options.word_alternatives_threshold] - Number between 0 and 1 representing the minimum confidence before including an alternative word in the results. Must be set to enable word alternatives,
123
+
* @param {Boolean} [options.profanity_filter=false] - set to true to filter out profanity and replace the words with *'s
120
124
* @param {Number} [options.inactivity_timeout=30] - how many seconds of silence before automatically closing the stream (even if continuous is true). use -1 for infinity
121
125
* @param {Boolean} [options.readableObjectMode=false] - emit `result` objects instead of string Buffers for the `data` events. Changes several other defaults.
122
-
* @param {Number} [options.X-WDC-PL-OPT-OUT=0] set to 1 to opt-out of allowing Watson to use this request to improve it's services
126
+
* @param {Number} [options.X-WDC-PL-OPT-OUT=0] - set to 1 to opt-out of allowing Watson to use this request to improve it's services
123
127
*
124
128
* //todo: investigate other options at http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/apis/#!/speech-to-text/recognizeSessionless
0 commit comments