@@ -152,29 +152,31 @@ def get_model(self, model_id, **kwargs):
152
152
#########################
153
153
154
154
def recognize (self ,
155
- audio ,
155
+ audio : BinaryIO ,
156
156
* ,
157
- content_type = None ,
158
- model = None ,
159
- language_customization_id = None ,
160
- acoustic_customization_id = None ,
161
- base_model_version = None ,
162
- customization_weight = None ,
163
- inactivity_timeout = None ,
164
- keywords = None ,
165
- keywords_threshold = None ,
166
- max_alternatives = None ,
167
- word_alternatives_threshold = None ,
168
- word_confidence = None ,
169
- timestamps = None ,
170
- profanity_filter = None ,
171
- smart_formatting = None ,
172
- speaker_labels = None ,
173
- customization_id = None ,
174
- grammar_name = None ,
175
- redaction = None ,
176
- audio_metrics = None ,
177
- ** kwargs ):
157
+ content_type : str = None ,
158
+ model : str = None ,
159
+ language_customization_id : str = None ,
160
+ acoustic_customization_id : str = None ,
161
+ base_model_version : str = None ,
162
+ customization_weight : float = None ,
163
+ inactivity_timeout : int = None ,
164
+ keywords : List [str ] = None ,
165
+ keywords_threshold : float = None ,
166
+ max_alternatives : int = None ,
167
+ word_alternatives_threshold : float = None ,
168
+ word_confidence : bool = None ,
169
+ timestamps : bool = None ,
170
+ profanity_filter : bool = None ,
171
+ smart_formatting : bool = None ,
172
+ speaker_labels : bool = None ,
173
+ customization_id : str = None ,
174
+ grammar_name : str = None ,
175
+ redaction : bool = None ,
176
+ audio_metrics : bool = None ,
177
+ end_of_phrase_silence_time : float = None ,
178
+ split_transcript_at_phrase_end : bool = None ,
179
+ ** kwargs ) -> 'DetailedResponse' :
178
180
"""
179
181
Recognize audio.
180
182
@@ -389,6 +391,33 @@ def recognize(self,
389
391
information about the signal characteristics of the input audio. The
390
392
service returns audio metrics with the final transcription results. By
391
393
default, the service returns no audio metrics.
394
+ See [Audio
395
+ metrics](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-metrics#audio_metrics).
396
+ :param float end_of_phrase_silence_time: (optional) If `true`, specifies
397
+ the duration of the pause interval at which the service splits a transcript
398
+ into multiple final results. If the service detects pauses or extended
399
+ silence before it reaches the end of the audio stream, its response can
400
+ include multiple final results. Silence indicates a point at which the
401
+ speaker pauses between spoken words or phrases.
402
+ Specify a value for the pause interval in the range of 0.0 to 120.0.
403
+ * A value greater than 0 specifies the interval that the service is to use
404
+ for speech recognition.
405
+ * A value of 0 indicates that the service is to use the default interval.
406
+ It is equivalent to omitting the parameter.
407
+ The default pause interval for most languages is 0.8 seconds; the default
408
+ for Chinese is 0.6 seconds.
409
+ See [End of phrase silence
410
+ time](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-output#silence_time).
411
+ :param bool split_transcript_at_phrase_end: (optional) If `true`, directs
412
+ the service to split the transcript into multiple final results based on
413
+ semantic features of the input, for example, at the conclusion of
414
+ meaningful phrases such as sentences. The service bases its understanding
415
+ of semantic features on the base language model that you use with a
416
+ request. Custom language models and grammars can also influence how and
417
+ where the service splits a transcript. By default, the service splits
418
+ transcripts based solely on the pause interval.
419
+ See [Split transcript at phrase
420
+ end](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-output#split_transcript).
392
421
:param dict headers: A `dict` containing the request headers
393
422
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
394
423
:rtype: DetailedResponse
0 commit comments