Skip to content

Commit 4f5d34b

Browse files
yoshi-automationtseaver
authored andcommitted
docs(speech): update docstrings (via synth) (#9292)
1 parent b635845 commit 4f5d34b

20 files changed

+794
-737
lines changed

packages/google-cloud-python-speech/docs/gapic/v1/api.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Client for Cloud Speech API
2-
===========================
1+
Client for Cloud Speech-to-Text API
2+
===================================
33

44
.. automodule:: google.cloud.speech_v1
55
:members:
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Types for Cloud Speech API Client
2-
=================================
1+
Types for Cloud Speech-to-Text API Client
2+
=========================================
33

44
.. automodule:: google.cloud.speech_v1.types
55
:members:

packages/google-cloud-python-speech/docs/gapic/v1p1beta1/api.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Client for Cloud Speech API
2-
===========================
1+
Client for Cloud Speech-to-Text API
2+
===================================
33

44
.. automodule:: google.cloud.speech_v1p1beta1
55
:members:
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Types for Cloud Speech API Client
2-
=================================
1+
Types for Cloud Speech-to-Text API Client
2+
=========================================
33

44
.. automodule:: google.cloud.speech_v1p1beta1.types
55
:members:

packages/google-cloud-python-speech/google/cloud/speech_v1/gapic/enums.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ class AudioEncoding(enum.IntEnum):
2424
"""
2525
The encoding of the audio data sent in the request.
2626
27-
All encodings support only 1 channel (mono) audio.
27+
All encodings support only 1 channel (mono) audio, unless the
28+
``audio_channel_count`` and ``enable_separate_recognition_per_channel``
29+
fields are set.
2830
2931
For best results, the audio source should be captured and transmitted
3032
using a lossless encoding (``FLAC`` or ``LINEAR16``). The accuracy of
3133
the speech recognition can be reduced if lossy codecs are used to
3234
capture or transmit audio, particularly if background noise is present.
33-
Lossy codecs include ``MULAW``, ``AMR``, ``AMR_WB``, ``OGG_OPUS``, and
34-
``SPEEX_WITH_HEADER_BYTE``.
35+
Lossy codecs include ``MULAW``, ``AMR``, ``AMR_WB``, ``OGG_OPUS``,
36+
``SPEEX_WITH_HEADER_BYTE``, and ``MP3``.
3537
3638
The ``FLAC`` and ``WAV`` audio file formats include a header that
3739
describes the included audio content. You can request recognition for

packages/google-cloud-python-speech/google/cloud/speech_v1/gapic/speech_client.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ def recognize(
212212
>>> response = client.recognize(config, audio)
213213
214214
Args:
215-
config (Union[dict, ~google.cloud.speech_v1.types.RecognitionConfig]): *Required* Provides information to the recognizer that specifies how to
215+
config (Union[dict, ~google.cloud.speech_v1.types.RecognitionConfig]): Required. Provides information to the recognizer that specifies how to
216216
process the request.
217217
218218
If a dict is provided, it must be of the same form as the protobuf
219219
message :class:`~google.cloud.speech_v1.types.RecognitionConfig`
220-
audio (Union[dict, ~google.cloud.speech_v1.types.RecognitionAudio]): *Required* The audio data to be recognized.
220+
audio (Union[dict, ~google.cloud.speech_v1.types.RecognitionAudio]): Required. The audio data to be recognized.
221221
222222
If a dict is provided, it must be of the same form as the protobuf
223223
message :class:`~google.cloud.speech_v1.types.RecognitionAudio`
@@ -268,7 +268,9 @@ def long_running_recognize(
268268
Performs asynchronous speech recognition: receive results via the
269269
google.longrunning.Operations interface. Returns either an
270270
``Operation.error`` or an ``Operation.response`` which contains a
271-
``LongRunningRecognizeResponse`` message.
271+
``LongRunningRecognizeResponse`` message. For more information on
272+
asynchronous speech recognition, see the
273+
`how-to <https://cloud.google.com/speech-to-text/docs/async-recognize>`__.
272274
273275
Example:
274276
>>> from google.cloud import speech_v1
@@ -295,12 +297,12 @@ def long_running_recognize(
295297
>>> metadata = response.metadata()
296298
297299
Args:
298-
config (Union[dict, ~google.cloud.speech_v1.types.RecognitionConfig]): *Required* Provides information to the recognizer that specifies how to
300+
config (Union[dict, ~google.cloud.speech_v1.types.RecognitionConfig]): Required. Provides information to the recognizer that specifies how to
299301
process the request.
300302
301303
If a dict is provided, it must be of the same form as the protobuf
302304
message :class:`~google.cloud.speech_v1.types.RecognitionConfig`
303-
audio (Union[dict, ~google.cloud.speech_v1.types.RecognitionAudio]): *Required* The audio data to be recognized.
305+
audio (Union[dict, ~google.cloud.speech_v1.types.RecognitionAudio]): Required. The audio data to be recognized.
304306
305307
If a dict is provided, it must be of the same form as the protobuf
306308
message :class:`~google.cloud.speech_v1.types.RecognitionAudio`

packages/google-cloud-python-speech/google/cloud/speech_v1/gapic/speech_client_config.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@
1010
"initial_retry_delay_millis": 100,
1111
"retry_delay_multiplier": 1.3,
1212
"max_retry_delay_millis": 60000,
13-
"initial_rpc_timeout_millis": 1000000,
13+
"initial_rpc_timeout_millis": 20000,
1414
"rpc_timeout_multiplier": 1.0,
15-
"max_rpc_timeout_millis": 1000000,
16-
"total_timeout_millis": 5000000,
15+
"max_rpc_timeout_millis": 20000,
16+
"total_timeout_millis": 600000,
1717
}
1818
},
1919
"methods": {
2020
"Recognize": {
21-
"timeout_millis": 200000,
22-
"retry_codes_name": "idempotent",
21+
"timeout_millis": 60000,
22+
"retry_codes_name": "non_idempotent",
2323
"retry_params_name": "default",
2424
},
2525
"LongRunningRecognize": {
26-
"timeout_millis": 200000,
26+
"timeout_millis": 60000,
2727
"retry_codes_name": "non_idempotent",
2828
"retry_params_name": "default",
2929
},
3030
"StreamingRecognize": {
31-
"timeout_millis": 200000,
32-
"retry_codes_name": "idempotent",
31+
"timeout_millis": 60000,
32+
"retry_codes_name": "non_idempotent",
3333
"retry_params_name": "default",
3434
},
3535
},

packages/google-cloud-python-speech/google/cloud/speech_v1/gapic/transports/speech_grpc_transport.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ def long_running_recognize(self):
134134
Performs asynchronous speech recognition: receive results via the
135135
google.longrunning.Operations interface. Returns either an
136136
``Operation.error`` or an ``Operation.response`` which contains a
137-
``LongRunningRecognizeResponse`` message.
137+
``LongRunningRecognizeResponse`` message. For more information on
138+
asynchronous speech recognition, see the
139+
`how-to <https://cloud.google.com/speech-to-text/docs/async-recognize>`__.
138140
139141
Returns:
140142
Callable: A callable which accepts the appropriate

0 commit comments

Comments
 (0)