Skip to content

Commit 9b31daf

Browse files
committed
dependency bump, moving semver and publish scripts to deploy section
so that they only run if other scripts passed but still fail the build if they error [semver patch]
1 parent b7f2790 commit 9b31daf

File tree

10 files changed

+50
-43
lines changed

10 files changed

+50
-43
lines changed

.travis.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ script:
1010
- npm test
1111
- sed -i "s/\/master\//\/$TRAVIS_BRANCH\//g" README.md
1212
- npm run doc
13-
- scripts/jsdoc/publish.sh
14-
- scripts/create_semver_tag.sh
1513
env:
1614
global:
1715
- secure: Bx6pW0ihp3Y2dW5a8fkPhbMKsVg7MRfCzN3laN/OL7vTy2etIDXFleddE5No74HVQ1gPhkOIoRko/pHPdzWGNq69VtoCxp3AdISsuillYcaDCfRXDBSZXbHVuXsUHFQIABIdKJZZVjjwXM4oulL4OWboZ8FWV7vgOBvN4ZrXjM8LfuahSG51cPbPktqa+v/rA03iuWwC8IUDhf5w2uNPrsvtzWmj+CHcpLIgjmJWan+SiJXK/i3Wz/B74Cb0RtP9Y7zJzIGSWg8Z1VruN/f8xoNeSbMz5HM+PMhGyQJ9QXUNEqUEiXG+gwIzhAYRwBbCGyQZME5zk/y7QM0lr3/4NBzq8e6RYWlyOVLRGxlL6SvPmQ/6FrMCe9QDcMnvDvfeYhTHa6SnkqymN1hp1JnPC65zXENbEOLJH/67mQs/WoHLuuZycUK0KPC+GK6Bc45ViXotyNTttzrxHfpOV4IXQDVqB6p6tlh940ksYpetSs+8s7piUOGIcu4XtYxdnSRGX7TwKiCuuK65XWYpk+oMWhKHsOS2FTDt85+PXKFnM1fiuFD+Oppa7xyXmSUZp4C1befd7nP7F5RGSkZWdfXuCY6xAS6E7dho4clIua2yhOWtgnoMlcjjht6sFYf8OEk3eoVvnP+OO3VSHwk0VkTbI3E3fp3H8CUXVMk9woegydQ=
@@ -49,3 +47,16 @@ deploy:
4947
on:
5048
branch: master
5149
repo: watson-developer-cloud/speech-javascript-sdk
50+
- provider: script
51+
script: scripts/jsdoc/publish.sh
52+
skip_cleanup: true
53+
on:
54+
branch: master
55+
repo: watson-developer-cloud/speech-javascript-sdk
56+
- provider: script
57+
script: scripts/create_semver_tag.sh
58+
skip_cleanup: true
59+
on:
60+
branch: master
61+
repo: watson-developer-cloud/speech-javascript-sdk
62+

examples/server.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ if (process.env.VCAP_SERVICES) {
3232
app.enable('trust proxy'); // required to work properly behind Bluemix's reverse proxy
3333

3434
const limiter = new RateLimit({
35-
windowMs: (
36-
15 * 60 * 1000
37-
), // 15 minutes
35+
windowMs: 15 * 60 * 1000, // 15 minutes
3836
max: 100, // limit each IP to 100 requests per windowMs
3937
delayMs: 0 // disable delaying - full speed until the max limit is reached
4038
});

examples/static/audio-video-deprecated/media-element-audio-stream.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ function MediaElementAudioStream(element, options) {
2626
// https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor
2727
// Possible values: null, 256, 512, 1024, 2048, 4096, 8192, 16384
2828
// however, webkitAudioContext (safari) requires it to be set
29-
bufferSize: (
30-
window.AudioContext ? 4096 : null
31-
),
29+
bufferSize: window.AudioContext ? 4096 : null,
3230
muteSource: false,
3331
autoPlay: true,
3432
crossOrigin: 'anonymous', // required for cross-domain audio playback

examples/static/audio-video-deprecated/recognize-element.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ module.exports = function recognizeElement(options) {
5757
objectMode: true,
5858
bufferSize: options.bufferSize,
5959
muteSource: options.muteSource,
60-
autoPlay: (
61-
options.autoPlay !== false
62-
) // default to true if it's undefined
60+
autoPlay: options.autoPlay !== false // default to true if it's undefined
6361
});
6462

6563
var stream = sourceStream.pipe(new L16({ writableObjectMode: true })).pipe(recognizeStream);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"karma-mocha": "^1.3.0",
4141
"memory-fs": "^0.4.1",
4242
"mocha": "^3.2.0",
43-
"prettier": "^0.16.0",
43+
"prettier": "^0.18.0",
4444
"serve-static": "^1.11.1",
4545
"sinon": "^1.17.7",
4646
"uglify-js": "^2.7.5",

speech-to-text/recognize-stream.js

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -92,31 +92,37 @@ function RecognizeStream(options) {
9292
if (!options.silent) {
9393
if (event === 'results' || event === 'result' || event === 'speaker_labels') {
9494
// eslint-disable-next-line no-console
95-
console.log(new Error(
96-
'Watson Speech to Text RecognizeStream: the ' +
97-
event +
98-
' event was deprecated. ' +
99-
"Please set {objectMode: true} and listen for the 'data' event instead. " +
100-
'Pass {silent: true} to disable this message.'
101-
));
95+
console.log(
96+
new Error(
97+
'Watson Speech to Text RecognizeStream: the ' +
98+
event +
99+
' event was deprecated. ' +
100+
"Please set {objectMode: true} and listen for the 'data' event instead. " +
101+
'Pass {silent: true} to disable this message.'
102+
)
103+
);
102104
} else if (event === 'connection-close') {
103105
// eslint-disable-next-line no-console
104-
console.log(new Error(
105-
'Watson Speech to Text RecognizeStream: the ' +
106-
event +
107-
' event was deprecated. ' +
108-
"Please listen for the 'close' event instead. " +
109-
'Pass {silent: true} to disable this message.'
110-
));
106+
console.log(
107+
new Error(
108+
'Watson Speech to Text RecognizeStream: the ' +
109+
event +
110+
' event was deprecated. ' +
111+
"Please listen for the 'close' event instead. " +
112+
'Pass {silent: true} to disable this message.'
113+
)
114+
);
111115
} else if (event === 'connect') {
112116
// eslint-disable-next-line no-console
113-
console.log(new Error(
114-
'Watson Speech to Text RecognizeStream: the ' +
115-
event +
116-
' event was deprecated. ' +
117-
"Please listen for the 'open' event instead. " +
118-
'Pass {silent: true} to disable this message.'
119-
));
117+
console.log(
118+
new Error(
119+
'Watson Speech to Text RecognizeStream: the ' +
120+
event +
121+
' event was deprecated. ' +
122+
"Please listen for the 'open' event instead. " +
123+
'Pass {silent: true} to disable this message.'
124+
)
125+
);
120126
}
121127
}
122128
});

speech-to-text/speaker-stream.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,7 @@ SpeakerStream.prototype.buildMessage = function() {
211211
.map(function(ts) {
212212
return ts[WORD];
213213
})
214-
.join(' ') +
215-
' ';
214+
.join(' ') + ' ';
216215
alt.timestamps = utterance.timestamps;
217216
// overwrite the final value
218217
result.final = final;

speech-to-text/webaudio-l16-stream.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ WebAudioL16Stream.prototype.downsample = function downsample(bufferNewSamples) {
8080

8181
// Downsampling and low-pass filter:
8282
// Input audio is typically 44.1kHz or 48kHz, this downsamples it to 16kHz.
83-
// It uses a FIR (finite impulse response) Filter to remove (or, at least attinuate)
84-
// audio frequencies > ~8kHz because sampled audio cannot accurately represent
85-
// frequiencies greater than half of the sample rate.
83+
// It uses a FIR (finite impulse response) Filter to remove (or, at least attinuate)
84+
// audio frequencies > ~8kHz because sampled audio cannot accurately represent
85+
// frequiencies greater than half of the sample rate.
8686
// (Human voice tops out at < 4kHz, so nothing important is lost for transcription.)
8787
// See http://dsp.stackexchange.com/a/37475/26392 for a good explination of this code.
8888
var filter = [

test/resources/offline_test_server.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ module.exports = function(app, log) {
3434
var wsServer = new WebSocketServer({
3535
httpServer: server,
3636
autoAcceptConnections: false, // true = emit 'request' events
37-
maxReceivedFrameSize: (
38-
1024 * 1024
39-
) // filestream produces 1mb chunks
37+
maxReceivedFrameSize: 1024 * 1024 // filestream produces 1mb chunks
4038
});
4139

4240
wsServer.on('request', function(request) {

test/speaker-stream-spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,7 @@ describe('SpeakerStream', function() {
461461
return count;
462462
}
463463
var kws = msg.results[0].keywords_result;
464-
return count +
465-
Object.keys(kws).reduce(
464+
return count + Object.keys(kws).reduce(
466465
function(subCount, keyword) {
467466
return subCount + kws[keyword].length;
468467
},

0 commit comments

Comments
 (0)