Skip to content

Commit 68b524d

Browse files
committed
fix: support base_model_version in STT recognize()
1 parent 872b29c commit 68b524d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/recognize-stream.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ class RecognizeStream extends Duplex {
112112
* @param {Boolean} [options.smart_formatting=false] - formats numeric values such as dates, times, currency, etc.
113113
* @param {String} [options.customization_id] - Customization ID
114114
* @param {IamTokenManagerV1} [options.token_manager] - Token manager for authenticating with IAM
115+
* @param {string} [options.base_model_version] - The version of the specified base model that is to be used with recognition request or, for the **Create a session** method, with the new session.
116+
* Multiple versions of a base model can exist when a model is updated for internal improvements. The parameter is intended primarily for use with custom models that have been upgraded for a new base model.
117+
* The default value depends on whether the parameter is used with or without a custom model. For more information, see [Base model version](https://console.bluemix.net/docs/services/speech-to-text/input.html#version).
115118
*
116119
* @constructor
117120
*/

speech-to-text/v1.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const protocols = {
1616
};
1717

1818
const PARAMS_ALLOWED = [
19-
'continuous',
2019
'max_alternatives',
2120
'timestamps',
2221
'word_confidence',
@@ -32,7 +31,8 @@ const PARAMS_ALLOWED = [
3231
'customization_id',
3332
'speaker_labels',
3433
'customization_weight',
35-
'acoustic_customization_id'
34+
'acoustic_customization_id',
35+
'base_model_version'
3636
];
3737

3838
/**
@@ -474,7 +474,7 @@ class SpeechToTextV1 extends GeneratedSpeechToTextV1 {
474474
* @param {Object} params The parameters
475475
* @param {Stream} params.audio - Audio to be recognized
476476
* @param {String} params.content_type - Content-type
477-
* @param {Boolean} [params.continuous]
477+
* @param {String} [params.base_model_version]
478478
* @param {Number} [params.max_alternatives]
479479
* @param {Boolean} [params.timestamps]
480480
* @param {Boolean} [params.word_confidence]

0 commit comments

Comments
 (0)