Skip to content

Commit e52c760

Browse files
docs: update documentation to require certain fields (#368)
* docs: update documentation to require certain fields PiperOrigin-RevId: 530345646 Source-Link: googleapis/googleapis@ae157a1 Source-Link: googleapis/googleapis-gen@1798b3d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTc5OGIzZDBiZDE2YzZmZmM2YTFjY2EzMWYzMTYyOTQyMzQ3MjdiYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b8869b1 commit e52c760

16 files changed

+98
-40
lines changed

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/async_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,14 @@ async def sample_synthesize_long_audio():
263263
audio_config = texttospeech_v1.AudioConfig()
264264
audio_config.audio_encoding = "ALAW"
265265
266+
voice = texttospeech_v1.VoiceSelectionParams()
267+
voice.language_code = "language_code_value"
268+
266269
request = texttospeech_v1.SynthesizeLongAudioRequest(
267270
input=input,
268271
audio_config=audio_config,
272+
output_gcs_uri="output_gcs_uri_value",
273+
voice=voice,
269274
)
270275
271276
# Make the request

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech_long_audio_synthesize/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,14 @@ def sample_synthesize_long_audio():
490490
audio_config = texttospeech_v1.AudioConfig()
491491
audio_config.audio_encoding = "ALAW"
492492
493+
voice = texttospeech_v1.VoiceSelectionParams()
494+
voice.language_code = "language_code_value"
495+
493496
request = texttospeech_v1.SynthesizeLongAudioRequest(
494497
input=input,
495498
audio_config=audio_config,
499+
output_gcs_uri="output_gcs_uri_value",
500+
voice=voice,
496501
)
497502
498503
# Make the request

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/types/cloud_tts_lrs.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,22 @@ class SynthesizeLongAudioRequest(proto.Message):
3939
Attributes:
4040
parent (str):
4141
The resource states of the request in the form of
42-
``projects/*/locations/*/voices/*``.
42+
``projects/*/locations/*``.
4343
input (google.cloud.texttospeech_v1.types.SynthesisInput):
4444
Required. The Synthesizer requires either
45-
plain text or SSML as input.
45+
plain text or SSML as input. While Long Audio is
46+
in preview, SSML is temporarily unsupported.
4647
audio_config (google.cloud.texttospeech_v1.types.AudioConfig):
4748
Required. The configuration of the
4849
synthesized audio.
4950
output_gcs_uri (str):
50-
Specifies a Cloud Storage URI for the synthesis results.
51-
Must be specified in the format:
51+
Required. Specifies a Cloud Storage URI for the synthesis
52+
results. Must be specified in the format:
5253
``gs://bucket_name/object_name``, and the bucket must
5354
already exist.
5455
voice (google.cloud.texttospeech_v1.types.VoiceSelectionParams):
55-
The desired voice of the synthesized audio.
56+
Required. The desired voice of the
57+
synthesized audio.
5658
"""
5759

5860
parent: str = proto.Field(

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/async_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,14 @@ async def sample_synthesize_long_audio():
263263
audio_config = texttospeech_v1beta1.AudioConfig()
264264
audio_config.audio_encoding = "ALAW"
265265
266+
voice = texttospeech_v1beta1.VoiceSelectionParams()
267+
voice.language_code = "language_code_value"
268+
266269
request = texttospeech_v1beta1.SynthesizeLongAudioRequest(
267270
input=input,
268271
audio_config=audio_config,
272+
output_gcs_uri="output_gcs_uri_value",
273+
voice=voice,
269274
)
270275
271276
# Make the request

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/services/text_to_speech_long_audio_synthesize/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,14 @@ def sample_synthesize_long_audio():
490490
audio_config = texttospeech_v1beta1.AudioConfig()
491491
audio_config.audio_encoding = "ALAW"
492492
493+
voice = texttospeech_v1beta1.VoiceSelectionParams()
494+
voice.language_code = "language_code_value"
495+
493496
request = texttospeech_v1beta1.SynthesizeLongAudioRequest(
494497
input=input,
495498
audio_config=audio_config,
499+
output_gcs_uri="output_gcs_uri_value",
500+
voice=voice,
496501
)
497502
498503
# Make the request

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1beta1/types/cloud_tts_lrs.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,22 @@ class SynthesizeLongAudioRequest(proto.Message):
3939
Attributes:
4040
parent (str):
4141
The resource states of the request in the form of
42-
``projects/*/locations/*/voices/*``.
42+
``projects/*/locations/*``.
4343
input (google.cloud.texttospeech_v1beta1.types.SynthesisInput):
4444
Required. The Synthesizer requires either
45-
plain text or SSML as input.
45+
plain text or SSML as input. While Long Audio is
46+
in preview, SSML is temporarily unsupported.
4647
audio_config (google.cloud.texttospeech_v1beta1.types.AudioConfig):
4748
Required. The configuration of the
4849
synthesized audio.
4950
output_gcs_uri (str):
50-
Specifies a Cloud Storage URI for the synthesis results.
51-
Must be specified in the format:
51+
Required. Specifies a Cloud Storage URI for the synthesis
52+
results. Must be specified in the format:
5253
``gs://bucket_name/object_name``, and the bucket must
5354
already exist.
5455
voice (google.cloud.texttospeech_v1beta1.types.VoiceSelectionParams):
55-
The desired voice of the synthesized audio.
56+
Required. The desired voice of the
57+
synthesized audio.
5658
"""
5759

5860
parent: str = proto.Field(

packages/google-cloud-texttospeech/samples/generated_samples/snippet_metadata_google.cloud.texttospeech.v1.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@
5656
"regionTag": "texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_async",
5757
"segments": [
5858
{
59-
"end": 62,
59+
"end": 67,
6060
"start": 27,
6161
"type": "FULL"
6262
},
6363
{
64-
"end": 62,
64+
"end": 67,
6565
"start": 27,
6666
"type": "SHORT"
6767
},
@@ -71,18 +71,18 @@
7171
"type": "CLIENT_INITIALIZATION"
7272
},
7373
{
74-
"end": 52,
74+
"end": 57,
7575
"start": 41,
7676
"type": "REQUEST_INITIALIZATION"
7777
},
7878
{
79-
"end": 59,
80-
"start": 53,
79+
"end": 64,
80+
"start": 58,
8181
"type": "REQUEST_EXECUTION"
8282
},
8383
{
84-
"end": 63,
85-
"start": 60,
84+
"end": 68,
85+
"start": 65,
8686
"type": "RESPONSE_HANDLING"
8787
}
8888
],
@@ -132,12 +132,12 @@
132132
"regionTag": "texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync",
133133
"segments": [
134134
{
135-
"end": 62,
135+
"end": 67,
136136
"start": 27,
137137
"type": "FULL"
138138
},
139139
{
140-
"end": 62,
140+
"end": 67,
141141
"start": 27,
142142
"type": "SHORT"
143143
},
@@ -147,18 +147,18 @@
147147
"type": "CLIENT_INITIALIZATION"
148148
},
149149
{
150-
"end": 52,
150+
"end": 57,
151151
"start": 41,
152152
"type": "REQUEST_INITIALIZATION"
153153
},
154154
{
155-
"end": 59,
156-
"start": 53,
155+
"end": 64,
156+
"start": 58,
157157
"type": "REQUEST_EXECUTION"
158158
},
159159
{
160-
"end": 63,
161-
"start": 60,
160+
"end": 68,
161+
"start": 65,
162162
"type": "RESPONSE_HANDLING"
163163
}
164164
],

packages/google-cloud-texttospeech/samples/generated_samples/snippet_metadata_google.cloud.texttospeech.v1beta1.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@
5656
"regionTag": "texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_async",
5757
"segments": [
5858
{
59-
"end": 62,
59+
"end": 67,
6060
"start": 27,
6161
"type": "FULL"
6262
},
6363
{
64-
"end": 62,
64+
"end": 67,
6565
"start": 27,
6666
"type": "SHORT"
6767
},
@@ -71,18 +71,18 @@
7171
"type": "CLIENT_INITIALIZATION"
7272
},
7373
{
74-
"end": 52,
74+
"end": 57,
7575
"start": 41,
7676
"type": "REQUEST_INITIALIZATION"
7777
},
7878
{
79-
"end": 59,
80-
"start": 53,
79+
"end": 64,
80+
"start": 58,
8181
"type": "REQUEST_EXECUTION"
8282
},
8383
{
84-
"end": 63,
85-
"start": 60,
84+
"end": 68,
85+
"start": 65,
8686
"type": "RESPONSE_HANDLING"
8787
}
8888
],
@@ -132,12 +132,12 @@
132132
"regionTag": "texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync",
133133
"segments": [
134134
{
135-
"end": 62,
135+
"end": 67,
136136
"start": 27,
137137
"type": "FULL"
138138
},
139139
{
140-
"end": 62,
140+
"end": 67,
141141
"start": 27,
142142
"type": "SHORT"
143143
},
@@ -147,18 +147,18 @@
147147
"type": "CLIENT_INITIALIZATION"
148148
},
149149
{
150-
"end": 52,
150+
"end": 57,
151151
"start": 41,
152152
"type": "REQUEST_INITIALIZATION"
153153
},
154154
{
155-
"end": 59,
156-
"start": 53,
155+
"end": 64,
156+
"start": 58,
157157
"type": "REQUEST_EXECUTION"
158158
},
159159
{
160-
"end": 63,
161-
"start": 60,
160+
"end": 68,
161+
"start": 65,
162162
"type": "RESPONSE_HANDLING"
163163
}
164164
],

packages/google-cloud-texttospeech/samples/generated_samples/texttospeech_v1_generated_text_to_speech_long_audio_synthesize_synthesize_long_audio_async.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,14 @@ async def sample_synthesize_long_audio():
4545
audio_config = texttospeech_v1.AudioConfig()
4646
audio_config.audio_encoding = "ALAW"
4747

48+
voice = texttospeech_v1.VoiceSelectionParams()
49+
voice.language_code = "language_code_value"
50+
4851
request = texttospeech_v1.SynthesizeLongAudioRequest(
4952
input=input,
5053
audio_config=audio_config,
54+
output_gcs_uri="output_gcs_uri_value",
55+
voice=voice,
5156
)
5257

5358
# Make the request

packages/google-cloud-texttospeech/samples/generated_samples/texttospeech_v1_generated_text_to_speech_long_audio_synthesize_synthesize_long_audio_sync.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,14 @@ def sample_synthesize_long_audio():
4545
audio_config = texttospeech_v1.AudioConfig()
4646
audio_config.audio_encoding = "ALAW"
4747

48+
voice = texttospeech_v1.VoiceSelectionParams()
49+
voice.language_code = "language_code_value"
50+
4851
request = texttospeech_v1.SynthesizeLongAudioRequest(
4952
input=input,
5053
audio_config=audio_config,
54+
output_gcs_uri="output_gcs_uri_value",
55+
voice=voice,
5156
)
5257

5358
# Make the request

0 commit comments

Comments
 (0)