You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/recognize-stream.ts
+2-6
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/**
2
-
* (C) Copyright IBM Corp. 2014, 2020.
2
+
* (C) Copyright IBM Corp. 2014, 2024.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -62,7 +62,7 @@ class RecognizeStream extends Duplex {
62
62
*
63
63
* Uses WebSockets under the hood. For audio with no recognizable speech, no `data` events are emitted.
64
64
*
65
-
* By default, only finalized text is emitted in the data events, however when `objectMode`/`readableObjectMode` and `interim_results` are enabled, both interim and final results objects are emitted.
65
+
* By default, only finalized text is emitted in the data events, however when `objectMode`/`readableObjectMode` is enabled, both interim and final results objects are emitted.
66
66
* WriteableElementStream uses this, for example, to live-update the DOM with word-by-word transcriptions.
67
67
*
68
68
* Note that the WebSocket connection is not established until the first chunk of data is recieved. This allows for auto-detection of content type (for wav/flac/opus audio).
@@ -86,7 +86,6 @@ class RecognizeStream extends Duplex {
86
86
* @param {string} [options.contentType] - The format (MIME type) of the audio
87
87
* @param {number} [options.customizationWeight] - Tell the service how much weight to give to words from the custom language model compared to those from the base model for the current request
88
88
* @param {number} [options.inactivityTimeout] - The time in seconds after which, if only silence (no speech) is detected in the audio, the connection is closed (default=30)
89
-
* @param {boolean} [options.interimResults] - If true, the service returns interim results as a stream of JSON SpeechRecognitionResults objects (default=false)
90
89
* @param {string[]} [options.keywords] - An array of keyword strings to spot in the audio
91
90
* @param {number} [options.keywordsThreshold] - A confidence value that is the lower bound for spotting a keyword
92
91
* @param {number} [options.maxAlternatives] - The maximum number of alternative transcripts that the service is to return (default=1)
@@ -105,7 +104,6 @@ class RecognizeStream extends Duplex {
105
104
* @param {boolean} [options.splitTranscriptAtPhraseEnd] - If `true`, directs the service to split the transcript into multiple final results based on semantic features of the input
106
105
* @param {number} [options.speechDetectorSensitivity] - The sensitivity of speech activity detection that the service is to perform
107
106
* @param {number} [options.backgroundAudioSuppression] - The level to which the service is to suppress background audio based on its volume to prevent it from being transcribed as speech
108
-
* @param {boolean} [params.lowLatency] - If `true` for next-generation `Multimedia` and `Telephony` models that support low latency, directs the service to produce results even more quickly than it usually does
109
107
* @constructor
110
108
*/
111
109
constructor(options: RecognizeStream.Options){
@@ -168,7 +166,6 @@ class RecognizeStream extends Duplex {
168
166
'timestamps',
169
167
'word_confidence',
170
168
'content-type',
171
-
'interim_results',
172
169
'keywords',
173
170
'keywords_threshold',
174
171
'max_alternatives',
@@ -182,7 +179,6 @@ class RecognizeStream extends Duplex {
0 commit comments