Skip to content

Commit 755fd8a

Browse files
feat: add LRS API (#3706)
* feat: add LRS API PiperOrigin-RevId: 493606501 Source-Link: googleapis/googleapis@a1b5429 Source-Link: googleapis/googleapis-gen@ea4e780 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRleHR0b3NwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiZWE0ZTc4MDJiN2RhN2RiM2EyZjQyMmE1ZGJmNGUzZjRmOGM2MDY3ZCJ9 * 🦉 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 5d84b5c commit 755fd8a

19 files changed

Lines changed: 3083 additions & 18 deletions

packages/google-cloud-texttospeech/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
9999
| --------------------------- | --------------------------------- | ------ |
100100
| Text_to_speech.list_voices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.list_voices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.list_voices.js,samples/README.md) |
101101
| Text_to_speech.synthesize_speech | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.synthesize_speech.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech.synthesize_speech.js,samples/README.md) |
102+
| Text_to_speech_long_audio_synthesize.synthesize_long_audio | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js,samples/README.md) |
102103
| Text_to_speech.list_voices | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.list_voices.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.list_voices.js,samples/README.md) |
103104
| Text_to_speech.synthesize_speech | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.synthesize_speech.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech.synthesize_speech.js,samples/README.md) |
104105
| Text_to_speech_long_audio_synthesize.synthesize_long_audio | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-texttospeech/samples/generated/v1beta1/text_to_speech_long_audio_synthesize.synthesize_long_audio.js,samples/README.md) |

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

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ option (google.api.resource_definition) = {
3737
// Service that implements Google Cloud Text-to-Speech API.
3838
service TextToSpeech {
3939
option (google.api.default_host) = "texttospeech.googleapis.com";
40-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
40+
option (google.api.oauth_scopes) =
41+
"https://www.googleapis.com/auth/cloud-platform";
4142

4243
// Returns a list of Voice supported for synthesis.
4344
rpc ListVoices(ListVoicesRequest) returns (ListVoicesResponse) {
@@ -49,7 +50,8 @@ service TextToSpeech {
4950

5051
// Synthesizes speech synchronously: receive results after all text input
5152
// has been processed.
52-
rpc SynthesizeSpeech(SynthesizeSpeechRequest) returns (SynthesizeSpeechResponse) {
53+
rpc SynthesizeSpeech(SynthesizeSpeechRequest)
54+
returns (SynthesizeSpeechResponse) {
5355
option (google.api.http) = {
5456
post: "/v1/text:synthesize"
5557
body: "*"
@@ -81,7 +83,8 @@ enum SsmlVoiceGender {
8183
// Configuration to set up audio encoder. The encoding determines the output
8284
// audio format that we'd like.
8385
enum AudioEncoding {
84-
// Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
86+
// Not specified. Will return result
87+
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
8588
AUDIO_ENCODING_UNSPECIFIED = 0;
8689

8790
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
@@ -156,8 +159,8 @@ message SynthesizeSpeechRequest {
156159

157160
// Contains text input to be synthesized. Either `text` or `ssml` must be
158161
// supplied. Supplying both or neither returns
159-
// [google.rpc.Code.INVALID_ARGUMENT][]. The input size is limited to 5000
160-
// characters.
162+
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. The
163+
// input size is limited to 5000 bytes.
161164
message SynthesisInput {
162165
// The input source, which is either plain text or SSML.
163166
oneof input_source {
@@ -166,17 +169,18 @@ message SynthesisInput {
166169

167170
// The SSML document to be synthesized. The SSML document must be valid
168171
// and well-formed. Otherwise the RPC will fail and return
169-
// [google.rpc.Code.INVALID_ARGUMENT][]. For more information, see
172+
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For
173+
// more information, see
170174
// [SSML](https://cloud.google.com/text-to-speech/docs/ssml).
171175
string ssml = 2;
172176
}
173177
}
174178

175179
// Description of which voice to use for a synthesis request.
176180
message VoiceSelectionParams {
177-
// Required. The language (and potentially also the region) of the voice expressed as a
178-
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g.
179-
// "en-US". This should not include a script tag (e.g. use
181+
// Required. The language (and potentially also the region) of the voice
182+
// expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
183+
// language tag, e.g. "en-US". This should not include a script tag (e.g. use
180184
// "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred
181185
// from the input provided in the SynthesisInput. The TTS service
182186
// will use this parameter to help choose an appropriate voice. Note that
@@ -245,7 +249,7 @@ message AudioConfig {
245249
// converting to the desired sample rate (which might result in worse audio
246250
// quality), unless the specified sample rate is not supported for the
247251
// encoding chosen, in which case it will fail the request and return
248-
// [google.rpc.Code.INVALID_ARGUMENT][].
252+
// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
249253
int32 sample_rate_hertz = 5 [(google.api.field_behavior) = OPTIONAL];
250254

251255
// Optional. Input only. An identifier which selects 'audio effects' profiles
@@ -282,9 +286,7 @@ message CustomVoiceParams {
282286
// Required. The name of the AutoML model that synthesizes the custom voice.
283287
string model = 1 [
284288
(google.api.field_behavior) = REQUIRED,
285-
(google.api.resource_reference) = {
286-
type: "automl.googleapis.com/Model"
287-
}
289+
(google.api.resource_reference) = { type: "automl.googleapis.com/Model" }
288290
];
289291

290292
// Optional. The usage of the synthesized audio to be reported.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// Copyright 2022 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+
15+
syntax = "proto3";
16+
17+
package google.cloud.texttospeech.v1;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/cloud/texttospeech/v1/cloud_tts.proto";
23+
import "google/longrunning/operations.proto";
24+
import "google/protobuf/timestamp.proto";
25+
26+
option cc_enable_arenas = true;
27+
option csharp_namespace = "Google.Cloud.TextToSpeech.V1";
28+
option go_package = "google.golang.org/genproto/googleapis/cloud/texttospeech/v1;texttospeech";
29+
option java_multiple_files = true;
30+
option java_outer_classname = "TextToSpeechLongAudioSynthesisProto";
31+
option java_package = "com.google.cloud.texttospeech.v1";
32+
option php_namespace = "Google\\Cloud\\TextToSpeech\\V1";
33+
option ruby_package = "Google::Cloud::TextToSpeech::V1";
34+
35+
// Service that implements Google Cloud Text-to-Speech API.
36+
service 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: "/v1/{parent=projects/*/locations/*/voices/*}:SynthesizeLongAudio"
46+
body: "*"
47+
};
48+
option (google.longrunning.operation_info) = {
49+
response_type: "SynthesizeLongAudioResponse"
50+
metadata_type: "SynthesizeLongAudioMetadata"
51+
};
52+
}
53+
}
54+
55+
// The top-level message sent by the client for the
56+
// `SynthesizeLongAudio` method.
57+
message SynthesizeLongAudioRequest {
58+
// The resource states of the request in the form of
59+
// `projects/*/locations/*/voices/*`.
60+
string parent = 1;
61+
62+
// Required. The Synthesizer requires either plain text or SSML as input.
63+
SynthesisInput input = 2 [(google.api.field_behavior) = REQUIRED];
64+
65+
// Required. The configuration of the synthesized audio.
66+
AudioConfig audio_config = 3 [(google.api.field_behavior) = REQUIRED];
67+
68+
// Specifies a Cloud Storage URI for the synthesis results. Must be
69+
// specified in the format: `gs://bucket_name/object_name`, and the bucket
70+
// must already exist.
71+
string output_gcs_uri = 4;
72+
73+
// The desired voice of the synthesized audio.
74+
VoiceSelectionParams voice = 5;
75+
}
76+
77+
// The message returned to the client by the `SynthesizeLongAudio` method.
78+
message SynthesizeLongAudioResponse {}
79+
80+
// Metadata for response returned by the `SynthesizeLongAudio` method.
81+
message SynthesizeLongAudioMetadata {
82+
// Time when the request was received.
83+
google.protobuf.Timestamp start_time = 1;
84+
85+
// Time of the most recent processing update.
86+
google.protobuf.Timestamp last_update_time = 2;
87+
88+
// The progress of the most recent processing update in percentage, ie. 70.0%.
89+
double progress_percentage = 3;
90+
}

0 commit comments

Comments
 (0)