|
1 | | -// Copyright 2021 Google LLC |
| 1 | +// Copyright 2022 Google LLC |
2 | 2 | // |
3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | // you may not use this file except in compliance with the License. |
@@ -58,19 +58,6 @@ service TextToSpeech { |
58 | 58 | } |
59 | 59 | } |
60 | 60 |
|
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 | | - |
74 | 61 | // Gender of the voice as described in |
75 | 62 | // [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). |
76 | 63 | enum SsmlVoiceGender { |
@@ -119,6 +106,19 @@ enum AudioEncoding { |
119 | 106 | ALAW = 6; |
120 | 107 | } |
121 | 108 |
|
| 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 | + |
122 | 122 | // The message returned to the client by the `ListVoices` method. |
123 | 123 | message ListVoicesResponse { |
124 | 124 | // The list of voices. |
@@ -197,6 +197,11 @@ message VoiceSelectionParams { |
197 | 197 | // voice of the appropriate gender is not available, the synthesizer should |
198 | 198 | // substitute a voice with a different gender rather than failing the request. |
199 | 199 | 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; |
200 | 205 | } |
201 | 206 |
|
202 | 207 | // Description of audio data to be synthesized. |
@@ -255,6 +260,37 @@ message AudioConfig { |
255 | 260 | ]; |
256 | 261 | } |
257 | 262 |
|
| 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 | + |
258 | 294 | // The message returned to the client by the `SynthesizeSpeech` method. |
259 | 295 | message SynthesizeSpeechResponse { |
260 | 296 | // The audio data bytes encoded as specified in the request, including the |
|
0 commit comments