Skip to content

Commit 94f4b70

Browse files
feat: promote CustomVoiceParams to v1 (#591)
* feat: promote CustomVoiceParams to v1 PiperOrigin-RevId: 433829087 Source-Link: googleapis/googleapis@9916192 Source-Link: googleapis/googleapis-gen@86d3ab8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODZkM2FiOGViNjY2MzRlYWZlMDYwODM3MjAzMGQ5NGIyMTM2MWRhZSJ9 * 🦉 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 e6f8cad commit 94f4b70

File tree

6 files changed

+663
-83
lines changed

6 files changed

+663
-83
lines changed

packages/google-cloud-texttospeech/protos/google/cloud/texttospeech/v1/cloud_tts.proto

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -58,19 +58,6 @@ service TextToSpeech {
5858
}
5959
}
6060

61-
// The top-level message sent by the client for the `ListVoices` method.
62-
message ListVoicesRequest {
63-
// Optional. Recommended.
64-
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
65-
// If not specified, the API will return all supported voices.
66-
// If specified, the ListVoices call will only return voices that can be used
67-
// to synthesize this language_code. For example, if you specify `"en-NZ"`,
68-
// all `"en-NZ"` voices will be returned. If you specify `"no"`, both
69-
// `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
70-
// returned.
71-
string language_code = 1 [(google.api.field_behavior) = OPTIONAL];
72-
}
73-
7461
// Gender of the voice as described in
7562
// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
7663
enum SsmlVoiceGender {
@@ -119,6 +106,19 @@ enum AudioEncoding {
119106
ALAW = 6;
120107
}
121108

109+
// The top-level message sent by the client for the `ListVoices` method.
110+
message ListVoicesRequest {
111+
// Optional. Recommended.
112+
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
113+
// If not specified, the API will return all supported voices.
114+
// If specified, the ListVoices call will only return voices that can be used
115+
// to synthesize this language_code. For example, if you specify `"en-NZ"`,
116+
// all `"en-NZ"` voices will be returned. If you specify `"no"`, both
117+
// `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
118+
// returned.
119+
string language_code = 1 [(google.api.field_behavior) = OPTIONAL];
120+
}
121+
122122
// The message returned to the client by the `ListVoices` method.
123123
message ListVoicesResponse {
124124
// The list of voices.
@@ -197,6 +197,11 @@ message VoiceSelectionParams {
197197
// voice of the appropriate gender is not available, the synthesizer should
198198
// substitute a voice with a different gender rather than failing the request.
199199
SsmlVoiceGender ssml_gender = 3;
200+
201+
// The configuration for a custom voice. If [CustomVoiceParams.model] is set,
202+
// the service will choose the custom voice matching the specified
203+
// configuration.
204+
CustomVoiceParams custom_voice = 4;
200205
}
201206

202207
// Description of audio data to be synthesized.
@@ -255,6 +260,37 @@ message AudioConfig {
255260
];
256261
}
257262

263+
// Description of the custom voice to be synthesized.
264+
message CustomVoiceParams {
265+
// The usage of the synthesized audio. You must report your honest and
266+
// correct usage of the service as it's regulated by contract and will cause
267+
// significant difference in billing.
268+
enum ReportedUsage {
269+
// Request with reported usage unspecified will be rejected.
270+
REPORTED_USAGE_UNSPECIFIED = 0;
271+
272+
// For scenarios where the synthesized audio is not downloadable and can
273+
// only be used once. For example, real-time request in IVR system.
274+
REALTIME = 1;
275+
276+
// For scenarios where the synthesized audio is downloadable and can be
277+
// reused. For example, the synthesized audio is downloaded, stored in
278+
// customer service system and played repeatedly.
279+
OFFLINE = 2;
280+
}
281+
282+
// Required. The name of the AutoML model that synthesizes the custom voice.
283+
string model = 1 [
284+
(google.api.field_behavior) = REQUIRED,
285+
(google.api.resource_reference) = {
286+
type: "automl.googleapis.com/Model"
287+
}
288+
];
289+
290+
// Optional. The usage of the synthesized audio to be reported.
291+
ReportedUsage reported_usage = 3 [(google.api.field_behavior) = OPTIONAL];
292+
}
293+
258294
// The message returned to the client by the `SynthesizeSpeech` method.
259295
message SynthesizeSpeechResponse {
260296
// The audio data bytes encoded as specified in the request, including the

packages/google-cloud-texttospeech/protos/protos.d.ts

Lines changed: 130 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)