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

Commit 205ceae

Browse files
fix: GoogleAdsError missing using generator version after 1.3.0
[PR](googleapis/gapic-generator-typescript#878) within updated gapic-generator-typescript version 1.4.0 Committer: @summer-ji-eng PiperOrigin-RevId: 375759421 Source-Link: googleapis/googleapis@95fa72f Source-Link: https://github.com/googleapis/googleapis-gen/commit/f40a34377ad488a7c2bc3992b3c8d5faf5a15c46
1 parent 5e9a78e commit 205ceae

32 files changed

Lines changed: 2659 additions & 0 deletions

owl-bot-staging/v1/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Texttospeech: Nodejs Client
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recurse": true,
3+
"skip": [
4+
"https://codecov.io/gh/googleapis/",
5+
"www.googleapis.com",
6+
"img.shields.io"
7+
],
8+
"silent": true,
9+
"concurrency": 10
10+
}

owl-bot-staging/v1/package.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"name": "@google-cloud/text-to-speech",
3+
"version": "0.1.0",
4+
"description": "Texttospeech client for Node.js",
5+
"repository": "googleapis/nodejs-texttospeech",
6+
"license": "Apache-2.0",
7+
"author": "Google LLC",
8+
"main": "build/src/index.js",
9+
"files": [
10+
"build/src",
11+
"build/protos"
12+
],
13+
"keywords": [
14+
"google apis client",
15+
"google api client",
16+
"google apis",
17+
"google api",
18+
"google",
19+
"google cloud platform",
20+
"google cloud",
21+
"cloud",
22+
"google texttospeech",
23+
"texttospeech",
24+
"text to speech"
25+
],
26+
"scripts": {
27+
"clean": "gts clean",
28+
"compile": "tsc -p . && cp -r protos build/",
29+
"compile-protos": "compileProtos src",
30+
"docs": "jsdoc -c .jsdoc.js",
31+
"predocs-test": "npm run docs",
32+
"docs-test": "linkinator docs",
33+
"fix": "gts fix",
34+
"lint": "gts check",
35+
"prepare": "npm run compile-protos && npm run compile",
36+
"system-test": "c8 mocha build/system-test",
37+
"test": "c8 mocha build/test"
38+
},
39+
"dependencies": {
40+
"google-gax": "^2.14.0"
41+
},
42+
"devDependencies": {
43+
"@types/mocha": "^8.2.2",
44+
"@types/node": "^14.17.1",
45+
"@types/sinon": "^10.0.0",
46+
"c8": "^7.7.2",
47+
"gts": "^3.1.0",
48+
"jsdoc": "^3.6.7",
49+
"jsdoc-fresh": "^1.0.2",
50+
"jsdoc-region-tag": "^1.0.6",
51+
"linkinator": "^2.13.6",
52+
"mocha": "^8.4.0",
53+
"null-loader": "^4.0.1",
54+
"pack-n-play": "^1.0.0-2",
55+
"sinon": "^10.0.0",
56+
"ts-loader": "^9.2.2",
57+
"typescript": "^4.2.4",
58+
"webpack": "^5.37.1",
59+
"webpack-cli": "^4.7.0"
60+
},
61+
"engines": {
62+
"node": ">=v10.24.0"
63+
}
64+
}
Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,254 @@
1+
// Copyright 2019 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+
16+
syntax = "proto3";
17+
18+
package google.cloud.texttospeech.v1;
19+
20+
import "google/api/annotations.proto";
21+
import "google/api/client.proto";
22+
import "google/api/field_behavior.proto";
23+
24+
option cc_enable_arenas = true;
25+
option csharp_namespace = "Google.Cloud.TextToSpeech.V1";
26+
option go_package = "google.golang.org/genproto/googleapis/cloud/texttospeech/v1;texttospeech";
27+
option java_multiple_files = true;
28+
option java_outer_classname = "TextToSpeechProto";
29+
option java_package = "com.google.cloud.texttospeech.v1";
30+
option php_namespace = "Google\\Cloud\\TextToSpeech\\V1";
31+
option ruby_package = "Google::Cloud::TextToSpeech::V1";
32+
33+
// Service that implements Google Cloud Text-to-Speech API.
34+
service TextToSpeech {
35+
option (google.api.default_host) = "texttospeech.googleapis.com";
36+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
37+
38+
// Returns a list of Voice supported for synthesis.
39+
rpc ListVoices(ListVoicesRequest) returns (ListVoicesResponse) {
40+
option (google.api.http) = {
41+
get: "/v1/voices"
42+
};
43+
option (google.api.method_signature) = "language_code";
44+
}
45+
46+
// Synthesizes speech synchronously: receive results after all text input
47+
// has been processed.
48+
rpc SynthesizeSpeech(SynthesizeSpeechRequest) returns (SynthesizeSpeechResponse) {
49+
option (google.api.http) = {
50+
post: "/v1/text:synthesize"
51+
body: "*"
52+
};
53+
option (google.api.method_signature) = "input,voice,audio_config";
54+
}
55+
}
56+
57+
// The top-level message sent by the client for the `ListVoices` method.
58+
message ListVoicesRequest {
59+
// Optional. Recommended.
60+
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
61+
// specified, the ListVoices call will only return voices that can be used to
62+
// synthesize this language_code. E.g. when specifying "en-NZ", you will get
63+
// supported "en-\*" voices; when specifying "no", you will get supported
64+
// "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices; specifying "zh"
65+
// will also get supported "cmn-\*" voices; specifying "zh-hk" will also get
66+
// supported "yue-\*" voices.
67+
string language_code = 1 [(google.api.field_behavior) = OPTIONAL];
68+
}
69+
70+
// Gender of the voice as described in
71+
// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
72+
enum SsmlVoiceGender {
73+
// An unspecified gender.
74+
// In VoiceSelectionParams, this means that the client doesn't care which
75+
// gender the selected voice will have. In the Voice field of
76+
// ListVoicesResponse, this may mean that the voice doesn't fit any of the
77+
// other categories in this enum, or that the gender of the voice isn't known.
78+
SSML_VOICE_GENDER_UNSPECIFIED = 0;
79+
80+
// A male voice.
81+
MALE = 1;
82+
83+
// A female voice.
84+
FEMALE = 2;
85+
86+
// A gender-neutral voice.
87+
NEUTRAL = 3;
88+
}
89+
90+
// Configuration to set up audio encoder. The encoding determines the output
91+
// audio format that we'd like.
92+
enum AudioEncoding {
93+
// Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
94+
AUDIO_ENCODING_UNSPECIFIED = 0;
95+
96+
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
97+
// Audio content returned as LINEAR16 also contains a WAV header.
98+
LINEAR16 = 1;
99+
100+
// MP3 audio at 32kbps.
101+
MP3 = 2;
102+
103+
// Opus encoded audio wrapped in an ogg container. The result will be a
104+
// file which can be played natively on Android, and in browsers (at least
105+
// Chrome and Firefox). The quality of the encoding is considerably higher
106+
// than MP3 while using approximately the same bitrate.
107+
OGG_OPUS = 3;
108+
}
109+
110+
// The message returned to the client by the `ListVoices` method.
111+
message ListVoicesResponse {
112+
// The list of voices.
113+
repeated Voice voices = 1;
114+
}
115+
116+
// Description of a voice supported by the TTS service.
117+
message Voice {
118+
// The languages that this voice supports, expressed as
119+
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
120+
// "en-US", "es-419", "cmn-tw").
121+
repeated string language_codes = 1;
122+
123+
// The name of this voice. Each distinct voice has a unique name.
124+
string name = 2;
125+
126+
// The gender of this voice.
127+
SsmlVoiceGender ssml_gender = 3;
128+
129+
// The natural sample rate (in hertz) for this voice.
130+
int32 natural_sample_rate_hertz = 4;
131+
}
132+
133+
// The top-level message sent by the client for the `SynthesizeSpeech` method.
134+
message SynthesizeSpeechRequest {
135+
// Required. The Synthesizer requires either plain text or SSML as input.
136+
SynthesisInput input = 1 [(google.api.field_behavior) = REQUIRED];
137+
138+
// Required. The desired voice of the synthesized audio.
139+
VoiceSelectionParams voice = 2 [(google.api.field_behavior) = REQUIRED];
140+
141+
// Required. The configuration of the synthesized audio.
142+
AudioConfig audio_config = 3 [(google.api.field_behavior) = REQUIRED];
143+
}
144+
145+
// Contains text input to be synthesized. Either `text` or `ssml` must be
146+
// supplied. Supplying both or neither returns
147+
// [google.rpc.Code.INVALID_ARGUMENT][]. The input size is limited to 5000
148+
// characters.
149+
message SynthesisInput {
150+
// The input source, which is either plain text or SSML.
151+
oneof input_source {
152+
// The raw text to be synthesized.
153+
string text = 1;
154+
155+
// The SSML document to be synthesized. The SSML document must be valid
156+
// and well-formed. Otherwise the RPC will fail and return
157+
// [google.rpc.Code.INVALID_ARGUMENT][]. For more information, see
158+
// [SSML](https://cloud.google.com/text-to-speech/docs/ssml).
159+
string ssml = 2;
160+
}
161+
}
162+
163+
// Description of which voice to use for a synthesis request.
164+
message VoiceSelectionParams {
165+
// Required. The language (and potentially also the region) of the voice expressed as a
166+
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g.
167+
// "en-US". This should not include a script tag (e.g. use
168+
// "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred
169+
// from the input provided in the SynthesisInput. The TTS service
170+
// will use this parameter to help choose an appropriate voice. Note that
171+
// the TTS service may choose a voice with a slightly different language code
172+
// than the one selected; it may substitute a different region
173+
// (e.g. using en-US rather than en-CA if there isn't a Canadian voice
174+
// available), or even a different language, e.g. using "nb" (Norwegian
175+
// Bokmal) instead of "no" (Norwegian)".
176+
string language_code = 1 [(google.api.field_behavior) = REQUIRED];
177+
178+
// The name of the voice. If not set, the service will choose a
179+
// voice based on the other parameters such as language_code and gender.
180+
string name = 2;
181+
182+
// The preferred gender of the voice. If not set, the service will
183+
// choose a voice based on the other parameters such as language_code and
184+
// name. Note that this is only a preference, not requirement; if a
185+
// voice of the appropriate gender is not available, the synthesizer should
186+
// substitute a voice with a different gender rather than failing the request.
187+
SsmlVoiceGender ssml_gender = 3;
188+
}
189+
190+
// Description of audio data to be synthesized.
191+
message AudioConfig {
192+
// Required. The format of the audio byte stream.
193+
AudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED];
194+
195+
// Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is
196+
// the normal native speed supported by the specific voice. 2.0 is twice as
197+
// fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0
198+
// speed. Any other values < 0.25 or > 4.0 will return an error.
199+
double speaking_rate = 2 [
200+
(google.api.field_behavior) = INPUT_ONLY,
201+
(google.api.field_behavior) = OPTIONAL
202+
];
203+
204+
// Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means
205+
// increase 20 semitones from the original pitch. -20 means decrease 20
206+
// semitones from the original pitch.
207+
double pitch = 3 [
208+
(google.api.field_behavior) = INPUT_ONLY,
209+
(google.api.field_behavior) = OPTIONAL
210+
];
211+
212+
// Optional. Input only. Volume gain (in dB) of the normal native volume
213+
// supported by the specific voice, in the range [-96.0, 16.0]. If unset, or
214+
// set to a value of 0.0 (dB), will play at normal native signal amplitude. A
215+
// value of -6.0 (dB) will play at approximately half the amplitude of the
216+
// normal native signal amplitude. A value of +6.0 (dB) will play at
217+
// approximately twice the amplitude of the normal native signal amplitude.
218+
// Strongly recommend not to exceed +10 (dB) as there's usually no effective
219+
// increase in loudness for any value greater than that.
220+
double volume_gain_db = 4 [
221+
(google.api.field_behavior) = INPUT_ONLY,
222+
(google.api.field_behavior) = OPTIONAL
223+
];
224+
225+
// Optional. The synthesis sample rate (in hertz) for this audio. When this is
226+
// specified in SynthesizeSpeechRequest, if this is different from the voice's
227+
// natural sample rate, then the synthesizer will honor this request by
228+
// converting to the desired sample rate (which might result in worse audio
229+
// quality), unless the specified sample rate is not supported for the
230+
// encoding chosen, in which case it will fail the request and return
231+
// [google.rpc.Code.INVALID_ARGUMENT][].
232+
int32 sample_rate_hertz = 5 [(google.api.field_behavior) = OPTIONAL];
233+
234+
// Optional. Input only. An identifier which selects 'audio effects' profiles
235+
// that are applied on (post synthesized) text to speech. Effects are applied
236+
// on top of each other in the order they are given. See
237+
// [audio
238+
// profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for
239+
// current supported profile ids.
240+
repeated string effects_profile_id = 6 [
241+
(google.api.field_behavior) = INPUT_ONLY,
242+
(google.api.field_behavior) = OPTIONAL
243+
];
244+
}
245+
246+
// The message returned to the client by the `SynthesizeSpeech` method.
247+
message SynthesizeSpeechResponse {
248+
// The audio data bytes encoded as specified in the request, including the
249+
// header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS).
250+
// For LINEAR16 audio, we include the WAV header. Note: as
251+
// with all bytes fields, protobuffers use a pure binary representation,
252+
// whereas JSON representations use base64.
253+
bytes audio_content = 1;
254+
}

owl-bot-staging/v1/src/index.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright 2021 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+
// https://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+
// ** This file is automatically generated by gapic-generator-typescript. **
16+
// ** https://github.com/googleapis/gapic-generator-typescript **
17+
// ** All changes to this file may be overwritten. **
18+
19+
import * as v1 from './v1';
20+
const TextToSpeechClient = v1.TextToSpeechClient;
21+
type TextToSpeechClient = v1.TextToSpeechClient;
22+
export {v1, TextToSpeechClient};
23+
export default {v1, TextToSpeechClient};
24+
import * as protos from '../protos/protos';
25+
export {protos}

0 commit comments

Comments
 (0)