google-cloud-text_to_speech-v1beta1 0.6.0 → 0.6.4
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 +67 -43
- data/lib/google/cloud/text_to_speech/v1beta1/version.rb +1 -1
- data/lib/google/cloud/texttospeech/v1beta1/cloud_tts_pb.rb +2 -2
- data/lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c08f170eb3ebf2568108d4c70a535f00a42735d0bea20a54e29bec9ec4a25a2b
|
4
|
+
data.tar.gz: 0db345725c656fbe3310a5d2034522e0256afc656f1c2a94b765e3b43fb517ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4c3f45076d43b93f43acb78c80682f8a856b3da58133336c77691fe455a503b3e880d4488776f8d3e81fa8f1f70daa0cbbd8ae3cc2f51a44d29501fd6c5a8da
|
7
|
+
data.tar.gz: 2c0de7b050aed3c50b7c8b6f44d921fc568d3f0660e79707b7c2bd55f9355da06bee1f945a4d4ddfab637843427240c59488f6ee2e7641d0d19e2dc8026ce5ab
|
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
|
|
@@ -39,13 +39,12 @@ module Google
|
|
39
39
|
# See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client::Configuration}
|
40
40
|
# for a description of the configuration fields.
|
41
41
|
#
|
42
|
-
#
|
42
|
+
# @example
|
43
43
|
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# end
|
44
|
+
# # Modify the configuration for all TextToSpeech clients
|
45
|
+
# ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config|
|
46
|
+
# config.timeout = 10.0
|
47
|
+
# end
|
49
48
|
#
|
50
49
|
# @yield [config] Configure the Client client.
|
51
50
|
# @yieldparam config [Client::Configuration]
|
@@ -65,10 +64,7 @@ module Google
|
|
65
64
|
|
66
65
|
default_config.timeout = 300.0
|
67
66
|
default_config.retry_policy = {
|
68
|
-
initial_delay: 0.1,
|
69
|
-
max_delay: 60.0,
|
70
|
-
multiplier: 1.3,
|
71
|
-
retry_codes: [14, 4]
|
67
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
72
68
|
}
|
73
69
|
|
74
70
|
default_config
|
@@ -100,19 +96,15 @@ module Google
|
|
100
96
|
##
|
101
97
|
# Create a new TextToSpeech client object.
|
102
98
|
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
# To create a new TextToSpeech client with the default
|
106
|
-
# configuration:
|
107
|
-
#
|
108
|
-
# client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
99
|
+
# @example
|
109
100
|
#
|
110
|
-
#
|
111
|
-
#
|
101
|
+
# # Create a client using the default configuration
|
102
|
+
# client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
112
103
|
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
104
|
+
# # Create a client using a custom configuration
|
105
|
+
# client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config|
|
106
|
+
# config.timeout = 10.0
|
107
|
+
# end
|
116
108
|
#
|
117
109
|
# @yield [config] Configure the TextToSpeech client.
|
118
110
|
# @yieldparam config [Client::Configuration]
|
@@ -132,14 +124,13 @@ module Google
|
|
132
124
|
|
133
125
|
# Create credentials
|
134
126
|
credentials = @config.credentials
|
135
|
-
# Use self-signed JWT if the
|
127
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
136
128
|
# but only if the default endpoint does not have a region prefix.
|
137
|
-
enable_self_signed_jwt = @config.
|
138
|
-
@config.endpoint == Client.configure.endpoint &&
|
129
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
139
130
|
!@config.endpoint.split(".").first.include?("-")
|
140
131
|
credentials ||= Credentials.default scope: @config.scope,
|
141
132
|
enable_self_signed_jwt: enable_self_signed_jwt
|
142
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
133
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
143
134
|
credentials = Credentials.new credentials, scope: @config.scope
|
144
135
|
end
|
145
136
|
@quota_project_id = @config.quota_project
|
@@ -193,6 +184,21 @@ module Google
|
|
193
184
|
#
|
194
185
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
195
186
|
#
|
187
|
+
# @example Basic example
|
188
|
+
# require "google/cloud/text_to_speech/v1beta1"
|
189
|
+
#
|
190
|
+
# # Create a client object. The client can be reused for multiple calls.
|
191
|
+
# client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
192
|
+
#
|
193
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
194
|
+
# request = Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest.new
|
195
|
+
#
|
196
|
+
# # Call the list_voices method.
|
197
|
+
# result = client.list_voices request
|
198
|
+
#
|
199
|
+
# # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse.
|
200
|
+
# p result
|
201
|
+
#
|
196
202
|
def list_voices request, options = nil
|
197
203
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
198
204
|
|
@@ -213,7 +219,9 @@ module Google
|
|
213
219
|
options.apply_defaults timeout: @config.rpcs.list_voices.timeout,
|
214
220
|
metadata: metadata,
|
215
221
|
retry_policy: @config.rpcs.list_voices.retry_policy
|
216
|
-
|
222
|
+
|
223
|
+
options.apply_defaults timeout: @config.timeout,
|
224
|
+
metadata: @config.metadata,
|
217
225
|
retry_policy: @config.retry_policy
|
218
226
|
|
219
227
|
@text_to_speech_stub.call_rpc :list_voices, request, options: options do |response, operation|
|
@@ -260,6 +268,21 @@ module Google
|
|
260
268
|
#
|
261
269
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
262
270
|
#
|
271
|
+
# @example Basic example
|
272
|
+
# require "google/cloud/text_to_speech/v1beta1"
|
273
|
+
#
|
274
|
+
# # Create a client object. The client can be reused for multiple calls.
|
275
|
+
# client = Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
|
276
|
+
#
|
277
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
278
|
+
# request = Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest.new
|
279
|
+
#
|
280
|
+
# # Call the synthesize_speech method.
|
281
|
+
# result = client.synthesize_speech request
|
282
|
+
#
|
283
|
+
# # The returned object is of type Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse.
|
284
|
+
# p result
|
285
|
+
#
|
263
286
|
def synthesize_speech request, options = nil
|
264
287
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
265
288
|
|
@@ -280,7 +303,9 @@ module Google
|
|
280
303
|
options.apply_defaults timeout: @config.rpcs.synthesize_speech.timeout,
|
281
304
|
metadata: metadata,
|
282
305
|
retry_policy: @config.rpcs.synthesize_speech.retry_policy
|
283
|
-
|
306
|
+
|
307
|
+
options.apply_defaults timeout: @config.timeout,
|
308
|
+
metadata: @config.metadata,
|
284
309
|
retry_policy: @config.retry_policy
|
285
310
|
|
286
311
|
@text_to_speech_stub.call_rpc :synthesize_speech, request, options: options do |response, operation|
|
@@ -304,22 +329,21 @@ module Google
|
|
304
329
|
# Configuration can be applied globally to all clients, or to a single client
|
305
330
|
# on construction.
|
306
331
|
#
|
307
|
-
#
|
308
|
-
#
|
309
|
-
#
|
310
|
-
# to 20 seconds,
|
311
|
-
#
|
312
|
-
#
|
313
|
-
#
|
314
|
-
#
|
315
|
-
#
|
316
|
-
#
|
317
|
-
#
|
318
|
-
#
|
319
|
-
#
|
320
|
-
#
|
321
|
-
#
|
322
|
-
# end
|
332
|
+
# @example
|
333
|
+
#
|
334
|
+
# # Modify the global config, setting the timeout for
|
335
|
+
# # list_voices to 20 seconds,
|
336
|
+
# # and all remaining timeouts to 10 seconds.
|
337
|
+
# ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config|
|
338
|
+
# config.timeout = 10.0
|
339
|
+
# config.rpcs.list_voices.timeout = 20.0
|
340
|
+
# end
|
341
|
+
#
|
342
|
+
# # Apply the above configuration only to a new client.
|
343
|
+
# client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config|
|
344
|
+
# config.timeout = 10.0
|
345
|
+
# config.rpcs.list_voices.timeout = 20.0
|
346
|
+
# end
|
323
347
|
#
|
324
348
|
# @!attribute [rw] endpoint
|
325
349
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,11 +1,11 @@
|
|
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/protobuf'
|
8
|
+
|
9
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
10
|
add_file("google/cloud/texttospeech/v1beta1/cloud_tts.proto", :syntax => :proto3) do
|
11
11
|
add_message "google.cloud.texttospeech.v1beta1.ListVoicesRequest" do
|
@@ -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
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
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.6.
|
4
|
+
version: 0.6.4
|
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-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.7'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: 2.a
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.7'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 2.a
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: google-cloud-errors
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
201
|
- !ruby/object:Gem::Version
|
196
202
|
version: '0'
|
197
203
|
requirements: []
|
198
|
-
rubygems_version: 3.2.
|
204
|
+
rubygems_version: 3.2.17
|
199
205
|
signing_key:
|
200
206
|
specification_version: 4
|
201
207
|
summary: API Client library for the Cloud Text-to-Speech V1beta1 API
|