google-cloud-text_to_speech-v1beta1 0.6.2 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb +71 -43
- data/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/paths.rb +52 -0
- data/lib/google/cloud/text_to_speech/v1beta1/text_to_speech.rb +1 -0
- data/lib/google/cloud/text_to_speech/v1beta1/version.rb +1 -1
- data/lib/google/cloud/texttospeech/v1beta1/cloud_tts_pb.rb +15 -2
- data/lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts.rb +38 -5
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c333a0d80fb66186fbd29af36e11dc2173dba7233518d40d018ca348eec2fa79
|
4
|
+
data.tar.gz: 2e845b415749a7ede84fdf4845a58bb39c4ee49cc49f04e8f54b0107cbf94c09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fb09da19a651ac3b929661acef557131e67668c821df74839ea5148084600f208f28b68b2567a5f86a3399d2081bec3cd8d65f04adce76ac41a59925a8a8bd2
|
7
|
+
data.tar.gz: 99a147f7cea083a93a1eac0a1b56ed2ba54f87fec085aaf15ade472e7cb51b30743ac54da5cd42d618d659c5e631e1c2ef032fc2cfd4a04f481ff50f1a0beb12
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
@@ -30,6 +30,8 @@ module Google
|
|
30
30
|
# Service that implements Google Cloud Text-to-Speech API.
|
31
31
|
#
|
32
32
|
class Client
|
33
|
+
include Paths
|
34
|
+
|
33
35
|
# @private
|
34
36
|
attr_reader :text_to_speech_stub
|
35
37
|
|
@@ -39,13 +41,12 @@ module Google
|
|
39
41
|
# See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client::Configuration}
|
40
42
|
# for a description of the configuration fields.
|
41
43
|
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
# To modify the configuration for all TextToSpeech clients:
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
46
|
+
# # Modify the configuration for all TextToSpeech clients
|
47
|
+
# ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
49
50
|
#
|
50
51
|
# @yield [config] Configure the Client client.
|
51
52
|
# @yieldparam config [Client::Configuration]
|
@@ -97,19 +98,15 @@ module Google
|
|
97
98
|
##
|
98
99
|
# Create a new TextToSpeech client object.
|
99
100
|
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
# To create a new TextToSpeech client with the default
|
103
|
-
# configuration:
|
101
|
+
# @example
|
104
102
|
#
|
105
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
106
105
|
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
# config.timeout = 10.0
|
112
|
-
# end
|
106
|
+
# # Create a client using a custom configuration
|
107
|
+
# client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
113
110
|
#
|
114
111
|
# @yield [config] Configure the TextToSpeech client.
|
115
112
|
# @yieldparam config [Client::Configuration]
|
@@ -129,10 +126,9 @@ module Google
|
|
129
126
|
|
130
127
|
# Create credentials
|
131
128
|
credentials = @config.credentials
|
132
|
-
# Use self-signed JWT if the
|
129
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
133
130
|
# but only if the default endpoint does not have a region prefix.
|
134
|
-
enable_self_signed_jwt = @config.
|
135
|
-
@config.endpoint == Client.configure.endpoint &&
|
131
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
136
132
|
!@config.endpoint.split(".").first.include?("-")
|
137
133
|
credentials ||= Credentials.default scope: @config.scope,
|
138
134
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -176,11 +172,10 @@ module Google
|
|
176
172
|
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
|
177
173
|
# If not specified, the API will return all supported voices.
|
178
174
|
# If specified, the ListVoices call will only return voices that can be used
|
179
|
-
# to synthesize this language_code.
|
180
|
-
#
|
181
|
-
# "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices
|
182
|
-
#
|
183
|
-
# supported "yue-hk" voices.
|
175
|
+
# to synthesize this language_code. For example, if you specify `"en-NZ"`,
|
176
|
+
# all `"en-NZ"` voices will be returned. If you specify `"no"`, both
|
177
|
+
# `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
|
178
|
+
# returned.
|
184
179
|
#
|
185
180
|
# @yield [response, operation] Access the result along with the RPC operation
|
186
181
|
# @yieldparam response [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse]
|
@@ -190,6 +185,21 @@ module Google
|
|
190
185
|
#
|
191
186
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
192
187
|
#
|
188
|
+
# @example Basic example
|
189
|
+
# require "google/cloud/text_to_speech/v1beta1"
|
190
|
+
#
|
191
|
+
# # Create a client object. The client can be reused for multiple calls.
|
192
|
+
# client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
193
|
+
#
|
194
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
195
|
+
# request = Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new
|
196
|
+
#
|
197
|
+
# # Call the list_voices method.
|
198
|
+
# result = client.list_voices request
|
199
|
+
#
|
200
|
+
# # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse.
|
201
|
+
# p result
|
202
|
+
#
|
193
203
|
def list_voices request, options = nil
|
194
204
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
195
205
|
|
@@ -210,7 +220,9 @@ module Google
|
|
210
220
|
options.apply_defaults timeout: @config.rpcs.list_voices.timeout,
|
211
221
|
metadata: metadata,
|
212
222
|
retry_policy: @config.rpcs.list_voices.retry_policy
|
213
|
-
|
223
|
+
|
224
|
+
options.apply_defaults timeout: @config.timeout,
|
225
|
+
metadata: @config.metadata,
|
214
226
|
retry_policy: @config.retry_policy
|
215
227
|
|
216
228
|
@text_to_speech_stub.call_rpc :list_voices, request, options: options do |response, operation|
|
@@ -257,6 +269,21 @@ module Google
|
|
257
269
|
#
|
258
270
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
259
271
|
#
|
272
|
+
# @example Basic example
|
273
|
+
# require "google/cloud/text_to_speech/v1beta1"
|
274
|
+
#
|
275
|
+
# # Create a client object. The client can be reused for multiple calls.
|
276
|
+
# client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
277
|
+
#
|
278
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
279
|
+
# request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new
|
280
|
+
#
|
281
|
+
# # Call the synthesize_speech method.
|
282
|
+
# result = client.synthesize_speech request
|
283
|
+
#
|
284
|
+
# # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse.
|
285
|
+
# p result
|
286
|
+
#
|
260
287
|
def synthesize_speech request, options = nil
|
261
288
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
262
289
|
|
@@ -277,7 +304,9 @@ module Google
|
|
277
304
|
options.apply_defaults timeout: @config.rpcs.synthesize_speech.timeout,
|
278
305
|
metadata: metadata,
|
279
306
|
retry_policy: @config.rpcs.synthesize_speech.retry_policy
|
280
|
-
|
307
|
+
|
308
|
+
options.apply_defaults timeout: @config.timeout,
|
309
|
+
metadata: @config.metadata,
|
281
310
|
retry_policy: @config.retry_policy
|
282
311
|
|
283
312
|
@text_to_speech_stub.call_rpc :synthesize_speech, request, options: options do |response, operation|
|
@@ -301,22 +330,21 @@ module Google
|
|
301
330
|
# Configuration can be applied globally to all clients, or to a single client
|
302
331
|
# on construction.
|
303
332
|
#
|
304
|
-
#
|
305
|
-
#
|
306
|
-
#
|
307
|
-
# to 20 seconds,
|
308
|
-
#
|
309
|
-
#
|
310
|
-
#
|
311
|
-
#
|
312
|
-
#
|
313
|
-
#
|
314
|
-
#
|
315
|
-
#
|
316
|
-
#
|
317
|
-
#
|
318
|
-
#
|
319
|
-
# end
|
333
|
+
# @example
|
334
|
+
#
|
335
|
+
# # Modify the global config, setting the timeout for
|
336
|
+
# # list_voices to 20 seconds,
|
337
|
+
# # and all remaining timeouts to 10 seconds.
|
338
|
+
# ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config|
|
339
|
+
# config.timeout = 10.0
|
340
|
+
# config.rpcs.list_voices.timeout = 20.0
|
341
|
+
# end
|
342
|
+
#
|
343
|
+
# # Apply the above configuration only to a new client.
|
344
|
+
# client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config|
|
345
|
+
# config.timeout = 10.0
|
346
|
+
# config.rpcs.list_voices.timeout = 20.0
|
347
|
+
# end
|
320
348
|
#
|
321
349
|
# @!attribute [rw] endpoint
|
322
350
|
# The hostname or hostname:port of the service endpoint.
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module TextToSpeech
|
23
|
+
module V1beta1
|
24
|
+
module TextToSpeech
|
25
|
+
# Path helper methods for the TextToSpeech API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Model resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/models/{model}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param model [String]
|
37
|
+
#
|
38
|
+
# @return [::String]
|
39
|
+
def model_path project:, location:, model:
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
|
+
|
43
|
+
"projects/#{project}/locations/#{location}/models/#{model}"
|
44
|
+
end
|
45
|
+
|
46
|
+
extend self
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -23,6 +23,7 @@ require "gapic/config/method"
|
|
23
23
|
require "google/cloud/text_to_speech/v1beta1/version"
|
24
24
|
|
25
25
|
require "google/cloud/text_to_speech/v1beta1/text_to_speech/credentials"
|
26
|
+
require "google/cloud/text_to_speech/v1beta1/text_to_speech/paths"
|
26
27
|
require "google/cloud/text_to_speech/v1beta1/text_to_speech/client"
|
27
28
|
|
28
29
|
module Google
|
@@ -1,11 +1,12 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/texttospeech/v1beta1/cloud_tts.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/api/resource_pb'
|
8
|
+
require 'google/protobuf'
|
9
|
+
|
9
10
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
11
|
add_file("google/cloud/texttospeech/v1beta1/cloud_tts.proto", :syntax => :proto3) do
|
11
12
|
add_message "google.cloud.texttospeech.v1beta1.ListVoicesRequest" do
|
@@ -40,6 +41,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
40
41
|
optional :language_code, :string, 1
|
41
42
|
optional :name, :string, 2
|
42
43
|
optional :ssml_gender, :enum, 3, "google.cloud.texttospeech.v1beta1.SsmlVoiceGender"
|
44
|
+
optional :custom_voice, :message, 4, "google.cloud.texttospeech.v1beta1.CustomVoiceParams"
|
43
45
|
end
|
44
46
|
add_message "google.cloud.texttospeech.v1beta1.AudioConfig" do
|
45
47
|
optional :audio_encoding, :enum, 1, "google.cloud.texttospeech.v1beta1.AudioEncoding"
|
@@ -49,6 +51,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
49
51
|
optional :sample_rate_hertz, :int32, 5
|
50
52
|
repeated :effects_profile_id, :string, 6
|
51
53
|
end
|
54
|
+
add_message "google.cloud.texttospeech.v1beta1.CustomVoiceParams" do
|
55
|
+
optional :model, :string, 1
|
56
|
+
optional :reported_usage, :enum, 3, "google.cloud.texttospeech.v1beta1.CustomVoiceParams.ReportedUsage"
|
57
|
+
end
|
58
|
+
add_enum "google.cloud.texttospeech.v1beta1.CustomVoiceParams.ReportedUsage" do
|
59
|
+
value :REPORTED_USAGE_UNSPECIFIED, 0
|
60
|
+
value :REALTIME, 1
|
61
|
+
value :OFFLINE, 2
|
62
|
+
end
|
52
63
|
add_message "google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse" do
|
53
64
|
optional :audio_content, :bytes, 1
|
54
65
|
repeated :timepoints, :message, 2, "google.cloud.texttospeech.v1beta1.Timepoint"
|
@@ -88,6 +99,8 @@ module Google
|
|
88
99
|
SynthesisInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesisInput").msgclass
|
89
100
|
VoiceSelectionParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.VoiceSelectionParams").msgclass
|
90
101
|
AudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.AudioConfig").msgclass
|
102
|
+
CustomVoiceParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomVoiceParams").msgclass
|
103
|
+
CustomVoiceParams::ReportedUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.CustomVoiceParams.ReportedUsage").enummodule
|
91
104
|
SynthesizeSpeechResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse").msgclass
|
92
105
|
Timepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.Timepoint").msgclass
|
93
106
|
SsmlVoiceGender = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.texttospeech.v1beta1.SsmlVoiceGender").enummodule
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
@@ -28,11 +28,10 @@ module Google
|
|
28
28
|
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
|
29
29
|
# If not specified, the API will return all supported voices.
|
30
30
|
# If specified, the ListVoices call will only return voices that can be used
|
31
|
-
# to synthesize this language_code.
|
32
|
-
#
|
33
|
-
# "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices
|
34
|
-
#
|
35
|
-
# supported "yue-hk" voices.
|
31
|
+
# to synthesize this language_code. For example, if you specify `"en-NZ"`,
|
32
|
+
# all `"en-NZ"` voices will be returned. If you specify `"no"`, both
|
33
|
+
# `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
|
34
|
+
# returned.
|
36
35
|
class ListVoicesRequest
|
37
36
|
include ::Google::Protobuf::MessageExts
|
38
37
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -137,6 +136,11 @@ module Google
|
|
137
136
|
# name. Note that this is only a preference, not requirement; if a
|
138
137
|
# voice of the appropriate gender is not available, the synthesizer should
|
139
138
|
# substitute a voice with a different gender rather than failing the request.
|
139
|
+
# @!attribute [rw] custom_voice
|
140
|
+
# @return [::Google::Cloud::TextToSpeech::V1beta1::CustomVoiceParams]
|
141
|
+
# The configuration for a custom voice. If [CustomVoiceParams.model] is set,
|
142
|
+
# the service will choose the custom voice matching the specified
|
143
|
+
# configuration.
|
140
144
|
class VoiceSelectionParams
|
141
145
|
include ::Google::Protobuf::MessageExts
|
142
146
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -189,6 +193,35 @@ module Google
|
|
189
193
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
190
194
|
end
|
191
195
|
|
196
|
+
# Description of the custom voice to be synthesized.
|
197
|
+
# @!attribute [rw] model
|
198
|
+
# @return [::String]
|
199
|
+
# Required. The name of the AutoML model that synthesizes the custom voice.
|
200
|
+
# @!attribute [rw] reported_usage
|
201
|
+
# @return [::Google::Cloud::TextToSpeech::V1beta1::CustomVoiceParams::ReportedUsage]
|
202
|
+
# Optional. The usage of the synthesized audio to be reported.
|
203
|
+
class CustomVoiceParams
|
204
|
+
include ::Google::Protobuf::MessageExts
|
205
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
206
|
+
|
207
|
+
# The usage of the synthesized audio. You must report your honest and
|
208
|
+
# correct usage of the service as it's regulated by contract and will cause
|
209
|
+
# significant difference in billing.
|
210
|
+
module ReportedUsage
|
211
|
+
# Request with reported usage unspecified will be rejected.
|
212
|
+
REPORTED_USAGE_UNSPECIFIED = 0
|
213
|
+
|
214
|
+
# For scenarios where the synthesized audio is not downloadable and can
|
215
|
+
# only be used once. For example, real-time request in IVR system.
|
216
|
+
REALTIME = 1
|
217
|
+
|
218
|
+
# For scenarios where the synthesized audio is downloadable and can be
|
219
|
+
# reused. For example, the synthesized audio is downloaded, stored in
|
220
|
+
# customer service system and played repeatedly.
|
221
|
+
OFFLINE = 2
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
192
225
|
# The message returned to the client by the `SynthesizeSpeech` method.
|
193
226
|
# @!attribute [rw] audio_content
|
194
227
|
# @return [::String]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-text_to_speech-v1beta1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- lib/google/cloud/text_to_speech/v1beta1/text_to_speech.rb
|
176
176
|
- lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb
|
177
177
|
- lib/google/cloud/text_to_speech/v1beta1/text_to_speech/credentials.rb
|
178
|
+
- lib/google/cloud/text_to_speech/v1beta1/text_to_speech/paths.rb
|
178
179
|
- lib/google/cloud/text_to_speech/v1beta1/version.rb
|
179
180
|
- lib/google/cloud/texttospeech/v1beta1/cloud_tts_pb.rb
|
180
181
|
- lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb
|
@@ -201,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
202
|
- !ruby/object:Gem::Version
|
202
203
|
version: '0'
|
203
204
|
requirements: []
|
204
|
-
rubygems_version: 3.
|
205
|
+
rubygems_version: 3.3.4
|
205
206
|
signing_key:
|
206
207
|
specification_version: 4
|
207
208
|
summary: API Client library for the Cloud Text-to-Speech V1beta1 API
|