xref: /aosp_15_r20/external/googleapis/google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.texttospeech.v1beta1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/cloud/texttospeech/v1beta1/cloud_tts.proto";
23import "google/longrunning/operations.proto";
24import "google/protobuf/timestamp.proto";
25
26option cc_enable_arenas = true;
27option csharp_namespace = "Google.Cloud.TextToSpeech.V1Beta1";
28option go_package = "cloud.google.com/go/texttospeech/apiv1beta1/texttospeechpb;texttospeechpb";
29option java_multiple_files = true;
30option java_outer_classname = "TextToSpeechLongAudioSynthesisProto";
31option java_package = "com.google.cloud.texttospeech.v1beta1";
32option php_namespace = "Google\\Cloud\\TextToSpeech\\V1beta1";
33option ruby_package = "Google::Cloud::TextToSpeech::V1beta1";
34
35// Service that implements Google Cloud Text-to-Speech API.
36service TextToSpeechLongAudioSynthesize {
37  option (google.api.default_host) = "texttospeech.googleapis.com";
38  option (google.api.oauth_scopes) =
39      "https://www.googleapis.com/auth/cloud-platform";
40
41  // Synthesizes long form text asynchronously.
42  rpc SynthesizeLongAudio(SynthesizeLongAudioRequest)
43      returns (google.longrunning.Operation) {
44    option (google.api.http) = {
45      post: "/v1beta1/{parent=projects/*/locations/*}:synthesizeLongAudio"
46      body: "*"
47    };
48    option (google.longrunning.operation_info) = {
49      response_type: "google.cloud.texttospeech.v1beta1.SynthesizeLongAudioResponse"
50      metadata_type: "google.cloud.texttospeech.v1beta1.SynthesizeLongAudioMetadata"
51    };
52  }
53}
54
55// The top-level message sent by the client for the
56// `SynthesizeLongAudio` method.
57message SynthesizeLongAudioRequest {
58  // The resource states of the request in the form of
59  // `projects/*/locations/*`.
60  string parent = 1;
61
62  // Required. The Synthesizer requires either plain text or SSML as input.
63  // While Long Audio is in preview, SSML is temporarily unsupported.
64  SynthesisInput input = 2 [(google.api.field_behavior) = REQUIRED];
65
66  // Required. The configuration of the synthesized audio.
67  AudioConfig audio_config = 3 [(google.api.field_behavior) = REQUIRED];
68
69  // Required. Specifies a Cloud Storage URI for the synthesis results. Must be
70  // specified in the format: `gs://bucket_name/object_name`, and the bucket
71  // must already exist.
72  string output_gcs_uri = 4 [(google.api.field_behavior) = REQUIRED];
73
74  // Required. The desired voice of the synthesized audio.
75  VoiceSelectionParams voice = 5 [(google.api.field_behavior) = REQUIRED];
76}
77
78// The message returned to the client by the `SynthesizeLongAudio` method.
79message SynthesizeLongAudioResponse {}
80
81// Metadata for response returned by the `SynthesizeLongAudio` method.
82message SynthesizeLongAudioMetadata {
83  // Time when the request was received.
84  google.protobuf.Timestamp start_time = 1;
85
86  // Deprecated. Do not use.
87  google.protobuf.Timestamp last_update_time = 2 [deprecated = true];
88
89  // The progress of the most recent processing update in percentage, ie. 70.0%.
90  double progress_percentage = 3;
91}
92