Skip to content

Commit 8d24d53

Browse files
committed
note about breaking change for speaker_labels
1 parent 4221d97 commit 8d24d53

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ This library is built with [browserify](http://browserify.org/) and easy to use
3131

3232
npm install --save watson-speech
3333

34+
Breaking change for v0.22.0
35+
----------------------------
36+
37+
The format of objects emitted in objectMode has changed from `{alternatives: [...], index: 1}` to `{results: [{alternatives: [...]}], result_index: 1}`.
38+
This was done to enable the new `speaker_labels` feature.
39+
There is a new `ResultExtractor` class and `recognizeMicrophone()` and `recognizeFile()` both accept a new `extract_results` option to restore the old behavior.
40+
41+
The format now exactly matches what the Watson Speech to Text service returns and shouldn't change again unless the Watson service changes.
42+
3443

3544
API & Examples
3645
--------------
@@ -101,6 +110,7 @@ There have been a few breaking changes in recent releases:
101110
* Removed `SpeechToText.recognizeElement()` due to quality issues
102111
* renamed `recognizeBlob` to `recognizeFile` to make the primary usage more apparent
103112
* Changed `playFile` option of `recognizeBlob()` to just `play`, corrected default
113+
* Changed format of objects emitted in objectMode to exactly match what service sends. Added `ResultExtractor` class and `extract_results` option to enable older behavior.
104114

105115
See [CHANGELOG.md](CHANGELOG.md) for a complete list of changes.
106116

0 commit comments

Comments
 (0)