Skip to content

Commit

Permalink
fix: correct long audio synthesis HTTP binding
Browse files Browse the repository at this point in the history
docs: Deprecate the custom voice usage field

PiperOrigin-RevId: 595119987
  • Loading branch information
Google APIs authored and Copybara-Service committed Jan 2, 2024
1 parent 75c4411 commit c22f408
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
12 changes: 6 additions & 6 deletions google/cloud/texttospeech/v1/cloud_tts.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 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 @@ -266,9 +266,8 @@ 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.
// Deprecated. The usage of the synthesized audio. Usage does not affect
// billing.
enum ReportedUsage {
// Request with reported usage unspecified will be rejected.
REPORTED_USAGE_UNSPECIFIED = 0;
Expand All @@ -289,8 +288,9 @@ message CustomVoiceParams {
(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];
// Optional. Deprecated. The usage of the synthesized audio to be reported.
ReportedUsage reported_usage = 3
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
}

// The message returned to the client by the `SynthesizeSpeech` method.
Expand Down
12 changes: 6 additions & 6 deletions google/cloud/texttospeech/v1/cloud_tts_lrs.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 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 @@ -42,12 +42,12 @@ service TextToSpeechLongAudioSynthesize {
rpc SynthesizeLongAudio(SynthesizeLongAudioRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*/voices/*}:SynthesizeLongAudio"
post: "/v1/{parent=projects/*/locations/*}:synthesizeLongAudio"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "SynthesizeLongAudioResponse"
metadata_type: "SynthesizeLongAudioMetadata"
response_type: "google.cloud.texttospeech.v1.SynthesizeLongAudioResponse"
metadata_type: "google.cloud.texttospeech.v1.SynthesizeLongAudioMetadata"
};
}
}
Expand Down Expand Up @@ -83,8 +83,8 @@ message SynthesizeLongAudioMetadata {
// Time when the request was received.
google.protobuf.Timestamp start_time = 1;

// Time of the most recent processing update.
google.protobuf.Timestamp last_update_time = 2;
// Deprecated. Do not use.
google.protobuf.Timestamp last_update_time = 2 [deprecated = true];

// The progress of the most recent processing update in percentage, ie. 70.0%.
double progress_percentage = 3;
Expand Down
10 changes: 10 additions & 0 deletions google/cloud/texttospeech/v1/texttospeech_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ apis:
- name: google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize
- name: google.longrunning.Operations

types:
- name: google.cloud.texttospeech.v1.SynthesizeLongAudioMetadata

documentation:
summary: |-
Synthesizes natural-sounding speech by applying powerful neural network
Expand All @@ -17,6 +20,13 @@ documentation:
Google Cloud Text-to-Speech API provides speech synthesis as a service.
http:
rules:
- selector: google.longrunning.Operations.GetOperation
get: '/v1/{name=projects/*/locations/*/operations/*}'
- selector: google.longrunning.Operations.ListOperations
get: '/v1/{name=projects/*/locations/*}/operations'

authentication:
rules:
- selector: google.cloud.texttospeech.v1.TextToSpeech.ListVoices
Expand Down

0 comments on commit c22f408

Please sign in to comment.