Skip to content

Commit 82190c7

Browse files
committed
feat(visual-recognition): parameter accept_language added to method detectFaces
1 parent 7ab567a commit 82190c7

2 files changed

Lines changed: 120 additions & 65 deletions

File tree

lib/recognize-stream.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ const QUERY_PARAMS_ALLOWED = [
4545
'watson-token',
4646
'language_customization_id',
4747
'customization_id',
48-
'acoustic_customization_id'
48+
'acoustic_customization_id',
49+
'grammar_name',
50+
'redaction'
4951
];
5052

5153
interface RecognizeStream extends Duplex {
@@ -120,6 +122,8 @@ class RecognizeStream extends Duplex {
120122
* 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.
121123
* 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).
122124
* @param {Boolean} [options.rejectUnauthorized] - If true, disable SSL verification for the WebSocket connection
125+
* @param {String} [options.grammar_name] - The name of a grammar that is to be used with the recognition request. If you specify a grammar, you must also use the `language_customization_id` parameter to specify the name of the custom language model for which the grammar is defined. The service recognizes only strings that are recognized by the specified grammar; it does not recognize other custom words from the model's words resource. See [Grammars](https://cloud.ibm.com/docs/services/speech-to-text/output.html)
126+
* @param {Boolean} [options.redaction] - If `true`, the service redacts, or masks, numeric data from final transcripts. The feature redacts any number that has three or more consecutive digits by replacing each digit with an `X` character. It is intended to redact sensitive numeric data, such as credit card numbers. By default, the service performs no redaction. When you enable redaction, the service automatically enables smart formatting, regardless of whether you explicitly disable that feature. To ensure maximum security, the service also disables keyword spotting (ignores the `keywords` and `keywords_threshold` parameters) and returns only a single final transcript (forces the `max_alternatives` parameter to be `1`). **Note:** Applies to US English, Japanese, and Korean transcription only. See [Numeric redaction](https://cloud.ibm.com/docs/services/speech-to-text/output.html#redaction)
123127
*
124128
* @constructor
125129
*/

0 commit comments

Comments
 (0)