google-cloud-text_to_speech-v1beta1 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/text_to_speech/v1beta1/text_to_speech/client.rb +74 -48
- 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/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts.rb +39 -5
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5d2b0a51e56d76100bfd9a77bdc9d2e9ce663a9a91ce7ac3417be646a1ee754
|
4
|
+
data.tar.gz: 125fa7369ebf81f8c1940b321fdfcb573cf04aafc54465b3cb8e5f162c9bc278
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea34e79be6a960f71dd8b39dc3291334484152dcaf30a13c59cf30d83f27ad0ccf20695f4b261be36ea43578276c41b6a43223405e5022871f76aa8b518cfa39
|
7
|
+
data.tar.gz: 6f8782beefbe9a9e886c9539e4d62b2b49fe739d167451a912bb0d5bd3910a531e4ac559243bdbf3150306a2d05da30d30ad2fa9821925f7d7b364b2bdce1a44
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-text_to_speech-v1beta1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `TEXTTOSPEECH_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `TEXTTOSPEECH_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/text_to_speech/v1beta1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/text_to_speech/v1beta1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |co
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/text_to_speech/v1beta1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/text_to_speech/v1beta1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.list_voices request
|
38
38
|
```
|
39
39
|
|
@@ -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]
|
@@ -65,10 +66,7 @@ module Google
|
|
65
66
|
|
66
67
|
default_config.timeout = 300.0
|
67
68
|
default_config.retry_policy = {
|
68
|
-
initial_delay: 0.1,
|
69
|
-
max_delay: 60.0,
|
70
|
-
multiplier: 1.3,
|
71
|
-
retry_codes: [14, 4]
|
69
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
72
70
|
}
|
73
71
|
|
74
72
|
default_config
|
@@ -100,19 +98,15 @@ module Google
|
|
100
98
|
##
|
101
99
|
# Create a new TextToSpeech client object.
|
102
100
|
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
# To create a new TextToSpeech client with the default
|
106
|
-
# configuration:
|
101
|
+
# @example
|
107
102
|
#
|
108
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
109
105
|
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
# config.timeout = 10.0
|
115
|
-
# 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
|
116
110
|
#
|
117
111
|
# @yield [config] Configure the TextToSpeech client.
|
118
112
|
# @yieldparam config [Client::Configuration]
|
@@ -132,14 +126,13 @@ module Google
|
|
132
126
|
|
133
127
|
# Create credentials
|
134
128
|
credentials = @config.credentials
|
135
|
-
# Use self-signed JWT if the
|
129
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
136
130
|
# but only if the default endpoint does not have a region prefix.
|
137
|
-
enable_self_signed_jwt = @config.
|
138
|
-
@config.endpoint == Client.configure.endpoint &&
|
131
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
139
132
|
!@config.endpoint.split(".").first.include?("-")
|
140
133
|
credentials ||= Credentials.default scope: @config.scope,
|
141
134
|
enable_self_signed_jwt: enable_self_signed_jwt
|
142
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
135
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
143
136
|
credentials = Credentials.new credentials, scope: @config.scope
|
144
137
|
end
|
145
138
|
@quota_project_id = @config.quota_project
|
@@ -179,11 +172,11 @@ module Google
|
|
179
172
|
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
|
180
173
|
# If not specified, the API will return all supported voices.
|
181
174
|
# If specified, the ListVoices call will only return voices that can be used
|
182
|
-
# to synthesize this language_code. E.g. when specifying "en-NZ"
|
183
|
-
# get supported "en-NZ" voices; when specifying "no"
|
184
|
-
# "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices;
|
185
|
-
# will also get supported "cmn-\*" voices; specifying
|
186
|
-
# supported "yue-hk" voices.
|
175
|
+
# to synthesize this language_code. E.g. when specifying `"en-NZ"`, you will
|
176
|
+
# get supported `"en-NZ"` voices; when specifying `"no"`, you will get
|
177
|
+
# supported `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices;
|
178
|
+
# specifying `"zh"` will also get supported `"cmn-\*"` voices; specifying
|
179
|
+
# `"zh-hk"` will also get supported `"yue-hk"` voices.
|
187
180
|
#
|
188
181
|
# @yield [response, operation] Access the result along with the RPC operation
|
189
182
|
# @yieldparam response [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse]
|
@@ -193,6 +186,21 @@ module Google
|
|
193
186
|
#
|
194
187
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
195
188
|
#
|
189
|
+
# @example Basic example
|
190
|
+
# require "google/cloud/text_to_speech/v1beta1"
|
191
|
+
#
|
192
|
+
# # Create a client object. The client can be reused for multiple calls.
|
193
|
+
# client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
194
|
+
#
|
195
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
196
|
+
# request = Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new
|
197
|
+
#
|
198
|
+
# # Call the list_voices method.
|
199
|
+
# result = client.list_voices request
|
200
|
+
#
|
201
|
+
# # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse.
|
202
|
+
# p result
|
203
|
+
#
|
196
204
|
def list_voices request, options = nil
|
197
205
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
198
206
|
|
@@ -213,7 +221,9 @@ module Google
|
|
213
221
|
options.apply_defaults timeout: @config.rpcs.list_voices.timeout,
|
214
222
|
metadata: metadata,
|
215
223
|
retry_policy: @config.rpcs.list_voices.retry_policy
|
216
|
-
|
224
|
+
|
225
|
+
options.apply_defaults timeout: @config.timeout,
|
226
|
+
metadata: @config.metadata,
|
217
227
|
retry_policy: @config.retry_policy
|
218
228
|
|
219
229
|
@text_to_speech_stub.call_rpc :list_voices, request, options: options do |response, operation|
|
@@ -260,6 +270,21 @@ module Google
|
|
260
270
|
#
|
261
271
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
262
272
|
#
|
273
|
+
# @example Basic example
|
274
|
+
# require "google/cloud/text_to_speech/v1beta1"
|
275
|
+
#
|
276
|
+
# # Create a client object. The client can be reused for multiple calls.
|
277
|
+
# client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
278
|
+
#
|
279
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
280
|
+
# request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new
|
281
|
+
#
|
282
|
+
# # Call the synthesize_speech method.
|
283
|
+
# result = client.synthesize_speech request
|
284
|
+
#
|
285
|
+
# # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse.
|
286
|
+
# p result
|
287
|
+
#
|
263
288
|
def synthesize_speech request, options = nil
|
264
289
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
265
290
|
|
@@ -280,7 +305,9 @@ module Google
|
|
280
305
|
options.apply_defaults timeout: @config.rpcs.synthesize_speech.timeout,
|
281
306
|
metadata: metadata,
|
282
307
|
retry_policy: @config.rpcs.synthesize_speech.retry_policy
|
283
|
-
|
308
|
+
|
309
|
+
options.apply_defaults timeout: @config.timeout,
|
310
|
+
metadata: @config.metadata,
|
284
311
|
retry_policy: @config.retry_policy
|
285
312
|
|
286
313
|
@text_to_speech_stub.call_rpc :synthesize_speech, request, options: options do |response, operation|
|
@@ -304,22 +331,21 @@ module Google
|
|
304
331
|
# Configuration can be applied globally to all clients, or to a single client
|
305
332
|
# on construction.
|
306
333
|
#
|
307
|
-
#
|
308
|
-
#
|
309
|
-
#
|
310
|
-
# to 20 seconds,
|
311
|
-
#
|
312
|
-
#
|
313
|
-
#
|
314
|
-
#
|
315
|
-
#
|
316
|
-
#
|
317
|
-
#
|
318
|
-
#
|
319
|
-
#
|
320
|
-
#
|
321
|
-
#
|
322
|
-
# end
|
334
|
+
# @example
|
335
|
+
#
|
336
|
+
# # Modify the global config, setting the timeout for
|
337
|
+
# # list_voices to 20 seconds,
|
338
|
+
# # and all remaining timeouts to 10 seconds.
|
339
|
+
# ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config|
|
340
|
+
# config.timeout = 10.0
|
341
|
+
# config.rpcs.list_voices.timeout = 20.0
|
342
|
+
# end
|
343
|
+
#
|
344
|
+
# # Apply the above configuration only to a new client.
|
345
|
+
# client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config|
|
346
|
+
# config.timeout = 10.0
|
347
|
+
# config.rpcs.list_voices.timeout = 20.0
|
348
|
+
# end
|
323
349
|
#
|
324
350
|
# @!attribute [rw] endpoint
|
325
351
|
# 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
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -28,11 +28,11 @@ 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. E.g. when specifying "en-NZ"
|
32
|
-
# get supported "en-NZ" voices; when specifying "no"
|
33
|
-
# "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices;
|
34
|
-
# will also get supported "cmn-\*" voices; specifying
|
35
|
-
# supported "yue-hk" voices.
|
31
|
+
# to synthesize this language_code. E.g. when specifying `"en-NZ"`, you will
|
32
|
+
# get supported `"en-NZ"` voices; when specifying `"no"`, you will get
|
33
|
+
# supported `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices;
|
34
|
+
# specifying `"zh"` will also get supported `"cmn-\*"` voices; specifying
|
35
|
+
# `"zh-hk"` will also get supported `"yue-hk"` voices.
|
36
36
|
class ListVoicesRequest
|
37
37
|
include ::Google::Protobuf::MessageExts
|
38
38
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -137,6 +137,11 @@ module Google
|
|
137
137
|
# name. Note that this is only a preference, not requirement; if a
|
138
138
|
# voice of the appropriate gender is not available, the synthesizer should
|
139
139
|
# substitute a voice with a different gender rather than failing the request.
|
140
|
+
# @!attribute [rw] custom_voice
|
141
|
+
# @return [::Google::Cloud::TextToSpeech::V1beta1::CustomVoiceParams]
|
142
|
+
# The configuration for a custom voice. If [CustomVoiceParams.model] is set,
|
143
|
+
# the service will choose the custom voice matching the specified
|
144
|
+
# configuration.
|
140
145
|
class VoiceSelectionParams
|
141
146
|
include ::Google::Protobuf::MessageExts
|
142
147
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -189,6 +194,35 @@ module Google
|
|
189
194
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
190
195
|
end
|
191
196
|
|
197
|
+
# Description of the custom voice to be synthesized.
|
198
|
+
# @!attribute [rw] model
|
199
|
+
# @return [::String]
|
200
|
+
# Required. The name of the AutoML model that synthesizes the custom voice.
|
201
|
+
# @!attribute [rw] reported_usage
|
202
|
+
# @return [::Google::Cloud::TextToSpeech::V1beta1::CustomVoiceParams::ReportedUsage]
|
203
|
+
# Optional. The usage of the synthesized audio to be reported.
|
204
|
+
class CustomVoiceParams
|
205
|
+
include ::Google::Protobuf::MessageExts
|
206
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
207
|
+
|
208
|
+
# The usage of the synthesized audio. You must report your honest and
|
209
|
+
# correct usage of the service as it's regulated by contract and will cause
|
210
|
+
# significant difference in billing.
|
211
|
+
module ReportedUsage
|
212
|
+
# Request with reported usage unspecified will be rejected.
|
213
|
+
REPORTED_USAGE_UNSPECIFIED = 0
|
214
|
+
|
215
|
+
# For scenarios where the synthesized audio is not downloadable and can
|
216
|
+
# only be used once. For example, real-time request in IVR system.
|
217
|
+
REALTIME = 1
|
218
|
+
|
219
|
+
# For scenarios where the synthesized audio is downloadable and can be
|
220
|
+
# reused. For example, the synthesized audio is downloaded, stored in
|
221
|
+
# customer service system and played repeatedly.
|
222
|
+
OFFLINE = 2
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
192
226
|
# The message returned to the client by the `SynthesizeSpeech` method.
|
193
227
|
# @!attribute [rw] audio_content
|
194
228
|
# @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.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-07 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
|