Skip to content

Commit e9ef5da

Browse files
fix(speech-to-text): support all allowed parameters in WebSocket… (#915)
fix(speech-to-text): support all allowed parameters in WebSocket method
2 parents 9696f62 + b91c1e2 commit e9ef5da

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/recognize-stream.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ import websocket = require ('websocket');
2424
const w3cWebSocket = websocket.w3cwebsocket;
2525

2626
const OPENING_MESSAGE_PARAMS_ALLOWED = [
27+
'action',
28+
'customization_weight',
29+
'processing_metrics',
30+
'processing_metrics_interval',
31+
'audio_metrics',
2732
'inactivity_timeout',
2833
'timestamps',
2934
'word_confidence',
@@ -37,7 +42,7 @@ const OPENING_MESSAGE_PARAMS_ALLOWED = [
3742
'smart_formatting',
3843
'speaker_labels',
3944
'grammar_name',
40-
'redaction'
45+
'redaction',
4146
];
4247

4348
const QUERY_PARAMS_ALLOWED = [
@@ -48,9 +53,8 @@ const QUERY_PARAMS_ALLOWED = [
4853
'customization_id',
4954
'acoustic_customization_id',
5055
'access_token',
51-
'processing_metrics',
52-
'processing_metrics_interval',
53-
'audio_metrics'
56+
'base_model_version',
57+
'x-watson-metadata',
5458
];
5559

5660
interface RecognizeStream extends Duplex {

0 commit comments

Comments
 (0)