Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

### v0.37.0
* BREAKING CHANGES INTRODUCED:
* All options parameters for all methods are coverted to be lowerCamelCase
* For example: `access_token` is now `accessToken` and `content-type` is now `contentType`
* Response data from the service is not affected by this change

### v0.34.0
* Add support for guessing .mp3 (via file name & header) & .webm (via filename) content-types
* Re-factored content-type guessing to check filename first, and file header second
Expand Down
4 changes: 2 additions & 2 deletions examples/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ app.use('/api/speech-to-text/token', function(req, res) {
}
const token = response.token || response;
if (process.env.SPEECH_TO_TEXT_IAM_APIKEY) {
res.json({ access_token: token, url: sttCredentials.url });
res.json({ accessToken: token, url: sttCredentials.url });
} else {
res.json({ token: token, url: sttCredentials.url });
}
Expand All @@ -121,7 +121,7 @@ app.use('/api/text-to-speech/token', function(req, res) {
}
const token = response.token || response;
if (process.env.TEXT_TO_SPEECH_IAM_APIKEY) {
res.json({ access_token: token, url: ttsCredentials.url });
res.json({ accessToken: token, url: ttsCredentials.url });
} else {
res.json({ token: token, url: ttsCredentials.url });
}
Expand Down
2 changes: 1 addition & 1 deletion examples/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h3>File Input</h3>
<ul>
<li><a href="file-url.html">Transcribe and Play a file via URL, with pre-loaded token (compatible with iOS)</a></li>
<li><a href="file-upload.html">Transcribe and Play a user-provided file</a></li>
<li><a href="speaker-labels-file-console.html">Transcribe from URL with <code>{speaker_labels: true}</code>, output to console</a></li>
<li><a href="speaker-labels-file-console.html">Transcribe from URL with <code>{speakerLabels: true}</code>, output to console</a></li>
<li><a href="speaker-stream-file-console.html">Transcribe from URL with <code>{resultsBySpeaker: true}</code>, output to console</a></li>
<li><a href="speaker-stream-file-html.html">Transcribe from URL with <code>{resultsBySpeaker: true}</code>, output HTML</a></li>
<li><a href="realtime-vs-no-realtime.html">Compare <code>realtime</code> and <code>TimingStream</code> options</a></li>
Expand Down
2 changes: 1 addition & 1 deletion examples/static/microphone-alternatives.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h2>Code for this demo:</h2>

var stream = WatsonSpeech.SpeechToText.recognizeMicrophone(Object.assign(token, {
objectMode: true,
max_alternatives: 4
maxAlternatives: 4
}));

stream.on('error', function(err) {
Expand Down
2 changes: 1 addition & 1 deletion examples/static/microphone-streaming-text-to-console.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h2>Code for this demo:</h2>
}).then(function (token) {

var stream = WatsonSpeech.SpeechToText.recognizeMicrophone(Object.assign(token, {
object_mode: false
objectMode: false
}));

stream.setEncoding('utf8'); // get text instead of Buffers for on data events
Expand Down
2 changes: 1 addition & 1 deletion examples/static/microphone-word-confidence.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h2>Code for this demo:</h2>
var stream = WatsonSpeech.SpeechToText.recognizeMicrophone(Object.assign(token, {
objectMode: true,
format: false,
word_confidence: true
wordConfidence: true
}));

stream.on('error', function(err) {
Expand Down
2 changes: 1 addition & 1 deletion examples/static/speaker-labels-file-console.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h2>Code for this demo:</h2>
.then(function(token) {
var stream = WatsonSpeech.SpeechToText.recognizeFile(Object.assign(token, {
file: '/en-us-multi-speaker-narrowband.wav',
speaker_labels: true,
speakerLabels: true,
// only certain models support speaker labels currently,
// see https://console.bluemix.net/docs/services/speech-to-text/output.html#output
model: 'en-US_NarrowbandModel',
Expand Down
2 changes: 1 addition & 1 deletion examples/static/speaker-stream-file-html.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2>Code for this demo:</h2>

var stream = WatsonSpeech.SpeechToText.recognizeFile(Object.assign(token, {
file: '/en-us-multi-speaker-narrowband.wav',
speaker_labels: true,
speakerLabels: true,
// only certain models support speaker labels currently,
// see https://console.bluemix.net/docs/services/speech-to-text/output.html#output
model: 'en-US_NarrowbandModel',
Expand Down
Loading