@@ -210,7 +210,7 @@ def recognize(self,
210210 speaker_labels = None ,
211211 ** kwargs ):
212212 """
213- Recognize audio (sessionless) .
213+ Recognize audio.
214214
215215 Sends audio and returns transcription results for a sessionless recognition
216216 request. Returns only the final results; to enable interim results, use
@@ -489,10 +489,16 @@ def create_job(self,
489489 receiving them via callback notification over HTTP because it provides
490490 confidentiality in addition to authentication and data integrity.
491491 The method supports the same basic parameters as other HTTP and WebSocket
492- recognition requests. The service imposes a data size limit of 100 MB. It
493- automatically detects the endianness of the incoming audio and, for audio that
494- includes multiple channels, downmixes the audio to one-channel mono during
495- transcoding. (For the `audio/l16` format, you can specify the endianness.)
492+ recognition requests. It also supports the following parameters specific to the
493+ asynchronous interface:
494+ * `callback_url`
495+ * `events`
496+ * `user_token`
497+ * `results_ttl`
498+ The service imposes a data size limit of 100 MB. It automatically detects the
499+ endianness of the incoming audio and, for audio that includes multiple channels,
500+ downmixes the audio to one-channel mono during transcoding. (For the `audio/l16`
501+ format, you can specify the endianness.)
496502 ### Audio formats (content types)
497503 Use the `Content-Type` parameter to specify the audio format (MIME type) of the
498504 audio:
@@ -1971,8 +1977,8 @@ def add_audio(self,
19711977 :param str audio_name: The name of the audio resource for the custom acoustic
19721978 model. When adding an audio resource, do not include spaces in the name; use a
19731979 localized name that matches the language of the custom model.
1974- :param list[ str] audio_resource: The audio resource that is to be added to the
1975- custom acoustic model, an individual audio file or an archive file.
1980+ :param str audio_resource: The audio resource that is to be added to the custom
1981+ acoustic model, an individual audio file or an archive file.
19761982 :param str content_type: The type of the input.
19771983 :param str contained_content_type: For an archive-type resource, specifies the
19781984 format of the audio files contained in the archive file. The parameter accepts all
@@ -1981,10 +1987,10 @@ def add_audio(self,
19811987 For a complete list of supported audio formats, see [Audio
19821988 formats](/docs/services/speech-to-text/input.html#formats).
19831989 :param bool allow_overwrite: If `true`, the specified corpus or audio resource
1984- overwrites an existing corpus or audio resource with the same name. If `false`
1985- ( the default), the request fails if a corpus or audio resource with the same name
1986- already exists. The parameter has no effect if a corpus or audio resource with the
1987- same name does not already exist.
1990+ overwrites an existing corpus or audio resource with the same name. If `false`,
1991+ the request fails if a corpus or audio resource with the same name already exists.
1992+ The parameter has no effect if a corpus or audio resource with the same name does
1993+ not already exist.
19881994 :param dict headers: A `dict` containing the request headers
19891995 :rtype: None
19901996 """
@@ -3073,8 +3079,8 @@ class KeywordResult(object):
30733079 matched in the audio input.
30743080 :attr float start_time: The start time in seconds of the keyword match.
30753081 :attr float end_time: The end time in seconds of the keyword match.
3076- :attr float confidence: A confidence score for the keyword match in the range of 0 to
3077- 1 .
3082+ :attr float confidence: A confidence score for the keyword match in the range of 0.0
3083+ to 1.0 .
30783084 """
30793085
30803086 def __init__ (self , normalized_text , start_time , end_time , confidence ):
@@ -3086,7 +3092,7 @@ def __init__(self, normalized_text, start_time, end_time, confidence):
30863092 :param float start_time: The start time in seconds of the keyword match.
30873093 :param float end_time: The end time in seconds of the keyword match.
30883094 :param float confidence: A confidence score for the keyword match in the range of
3089- 0 to 1.
3095+ 0.0 to 1.0 .
30903096 """
30913097 self .normalized_text = normalized_text
30923098 self .start_time = start_time
@@ -3973,15 +3979,15 @@ class SpeechRecognitionAlternative(object):
39733979
39743980 :attr str transcript: A transcription of the audio.
39753981 :attr float confidence: (optional) A score that indicates the service's confidence in
3976- the transcript in the range of 0 to 1. Returned only for the best alternative and only
3977- with results marked as final.
3982+ the transcript in the range of 0.0 to 1.0. Returned only for the best alternative and
3983+ only with results marked as final.
39783984 :attr list[str] timestamps: (optional) Time alignments for each word from the
39793985 transcript as a list of lists. Each inner list consists of three elements: the word
3980- followed by its start and end time in seconds. Example :
3986+ followed by its start and end time in seconds, for example :
39813987 `[["hello",0.0,1.2],["world",1.2,2.5]]`. Returned only for the best alternative.
39823988 :attr list[str] word_confidence: (optional) A confidence score for each word of the
39833989 transcript as a list of lists. Each inner list consists of two elements: the word and
3984- its confidence score in the range of 0 to 1. Example :
3990+ its confidence score in the range of 0.0 to 1.0, for example :
39853991 `[["hello",0.95],["world",0.866]]`. Returned only for the best alternative and only
39863992 with results marked as final.
39873993 """
@@ -3996,15 +4002,15 @@ def __init__(self,
39964002
39974003 :param str transcript: A transcription of the audio.
39984004 :param float confidence: (optional) A score that indicates the service's
3999- confidence in the transcript in the range of 0 to 1. Returned only for the best
4000- alternative and only with results marked as final.
4005+ confidence in the transcript in the range of 0.0 to 1.0. Returned only for the
4006+ best alternative and only with results marked as final.
40014007 :param list[str] timestamps: (optional) Time alignments for each word from the
40024008 transcript as a list of lists. Each inner list consists of three elements: the
4003- word followed by its start and end time in seconds. Example :
4009+ word followed by its start and end time in seconds, for example :
40044010 `[["hello",0.0,1.2],["world",1.2,2.5]]`. Returned only for the best alternative.
40054011 :param list[str] word_confidence: (optional) A confidence score for each word of
40064012 the transcript as a list of lists. Each inner list consists of two elements: the
4007- word and its confidence score in the range of 0 to 1. Example :
4013+ word and its confidence score in the range of 0.0 to 1.0, for example :
40084014 `[["hello",0.95],["world",0.866]]`. Returned only for the best alternative and
40094015 only with results marked as final.
40104016 """
@@ -4496,7 +4502,7 @@ class WordAlternativeResult(object):
44964502 WordAlternativeResult.
44974503
44984504 :attr float confidence: A confidence score for the word alternative hypothesis in the
4499- range of 0 to 1.
4505+ range of 0.0 to 1.0 .
45004506 :attr str word: An alternative hypothesis for a word from the input audio.
45014507 """
45024508
@@ -4505,7 +4511,7 @@ def __init__(self, confidence, word):
45054511 Initialize a WordAlternativeResult object.
45064512
45074513 :param float confidence: A confidence score for the word alternative hypothesis in
4508- the range of 0 to 1.
4514+ the range of 0.0 to 1.0 .
45094515 :param str word: An alternative hypothesis for a word from the input audio.
45104516 """
45114517 self .confidence = confidence
0 commit comments