Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
feat: promote CustomVoiceParams to v1 (#591)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Mar 14, 2022
1 parent c398fee commit fe647dc
Show file tree
Hide file tree
Showing 6 changed files with 663 additions and 83 deletions.
64 changes: 50 additions & 14 deletions protos/google/cloud/texttospeech/v1/cloud_tts.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -58,19 +58,6 @@ service TextToSpeech {
}
}

// The top-level message sent by the client for the `ListVoices` method.
message ListVoicesRequest {
// Optional. Recommended.
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
// If not specified, the API will return all supported voices.
// If specified, the ListVoices call will only return voices that can be used
// to synthesize this language_code. For example, if you specify `"en-NZ"`,
// all `"en-NZ"` voices will be returned. If you specify `"no"`, both
// `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
// returned.
string language_code = 1 [(google.api.field_behavior) = OPTIONAL];
}

// Gender of the voice as described in
// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
enum SsmlVoiceGender {
Expand Down Expand Up @@ -119,6 +106,19 @@ enum AudioEncoding {
ALAW = 6;
}

// The top-level message sent by the client for the `ListVoices` method.
message ListVoicesRequest {
// Optional. Recommended.
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
// If not specified, the API will return all supported voices.
// If specified, the ListVoices call will only return voices that can be used
// to synthesize this language_code. For example, if you specify `"en-NZ"`,
// all `"en-NZ"` voices will be returned. If you specify `"no"`, both
// `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
// returned.
string language_code = 1 [(google.api.field_behavior) = OPTIONAL];
}

// The message returned to the client by the `ListVoices` method.
message ListVoicesResponse {
// The list of voices.
Expand Down Expand Up @@ -197,6 +197,11 @@ message VoiceSelectionParams {
// voice of the appropriate gender is not available, the synthesizer should
// substitute a voice with a different gender rather than failing the request.
SsmlVoiceGender ssml_gender = 3;

// The configuration for a custom voice. If [CustomVoiceParams.model] is set,
// the service will choose the custom voice matching the specified
// configuration.
CustomVoiceParams custom_voice = 4;
}

// Description of audio data to be synthesized.
Expand Down Expand Up @@ -255,6 +260,37 @@ message AudioConfig {
];
}

// Description of the custom voice to be synthesized.
message CustomVoiceParams {
// The usage of the synthesized audio. You must report your honest and
// correct usage of the service as it's regulated by contract and will cause
// significant difference in billing.
enum ReportedUsage {
// Request with reported usage unspecified will be rejected.
REPORTED_USAGE_UNSPECIFIED = 0;

// For scenarios where the synthesized audio is not downloadable and can
// only be used once. For example, real-time request in IVR system.
REALTIME = 1;

// For scenarios where the synthesized audio is downloadable and can be
// reused. For example, the synthesized audio is downloaded, stored in
// customer service system and played repeatedly.
OFFLINE = 2;
}

// Required. The name of the AutoML model that synthesizes the custom voice.
string model = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "automl.googleapis.com/Model"
}
];

// Optional. The usage of the synthesized audio to be reported.
ReportedUsage reported_usage = 3 [(google.api.field_behavior) = OPTIONAL];
}

// The message returned to the client by the `SynthesizeSpeech` method.
message SynthesizeSpeechResponse {
// The audio data bytes encoded as specified in the request, including the
Expand Down
148 changes: 130 additions & 18 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fe647dc

Please sign in to comment.