google-cloud-text_to_speech-v1beta1 0.5.0 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- 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 +44 -49
- data/lib/google/cloud/text_to_speech/v1beta1/version.rb +1 -1
- data/lib/google/cloud/texttospeech/v1beta1/cloud_tts_pb.rb +1 -0
- data/lib/google/cloud/texttospeech/v1beta1/cloud_tts_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/texttospeech/v1beta1/cloud_tts.rb +11 -6
- 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: eb487510f962673ad23d8d1848f70f1123ef38200e00b0c069b186b454898d7f
|
4
|
+
data.tar.gz: '093af08eed710febc918104cb50cd3941c6e68dc9e05f1a21f2a2f457e9504e3'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ea0372cf4fafc40edf0a4c4085951dc1124379094abc46e0d0e31912d5193a12122c00af340b7a0343ef8976c9ea8b16d6528793ff14722dc5400e40dcf97c8
|
7
|
+
data.tar.gz: dbbbadbdb3442fc6d9b9fa2136a4be13eb1c9be4a3421c837edad3f7b4276895c59dad101b272f515fa4ce2ce128baa45faa920818fa46b57f460439cd16b66c
|
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
|
@@ -176,13 +167,14 @@ module Google
|
|
176
167
|
#
|
177
168
|
# @param language_code [::String]
|
178
169
|
# Optional. Recommended.
|
179
|
-
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
|
180
|
-
# specified, the
|
181
|
-
#
|
182
|
-
#
|
170
|
+
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
|
171
|
+
# If not specified, the API will return all supported voices.
|
172
|
+
# If specified, the ListVoices call will only return voices that can be used
|
173
|
+
# to synthesize this language_code. E.g. when specifying "en-NZ", you will
|
174
|
+
# get supported "en-NZ" voices; when specifying "no", you will get supported
|
183
175
|
# "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices; specifying "zh"
|
184
176
|
# will also get supported "cmn-\*" voices; specifying "zh-hk" will also get
|
185
|
-
# supported "yue
|
177
|
+
# supported "yue-hk" voices.
|
186
178
|
#
|
187
179
|
# @yield [response, operation] Access the result along with the RPC operation
|
188
180
|
# @yieldparam response [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse]
|
@@ -212,7 +204,9 @@ module Google
|
|
212
204
|
options.apply_defaults timeout: @config.rpcs.list_voices.timeout,
|
213
205
|
metadata: metadata,
|
214
206
|
retry_policy: @config.rpcs.list_voices.retry_policy
|
215
|
-
|
207
|
+
|
208
|
+
options.apply_defaults timeout: @config.timeout,
|
209
|
+
metadata: @config.metadata,
|
216
210
|
retry_policy: @config.retry_policy
|
217
211
|
|
218
212
|
@text_to_speech_stub.call_rpc :list_voices, request, options: options do |response, operation|
|
@@ -249,7 +243,7 @@ module Google
|
|
249
243
|
# @param audio_config [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig, ::Hash]
|
250
244
|
# Required. The configuration of the synthesized audio.
|
251
245
|
# @param enable_time_pointing [::Array<::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest::TimepointType>]
|
252
|
-
# Whether and what timepoints
|
246
|
+
# Whether and what timepoints are returned in the response.
|
253
247
|
#
|
254
248
|
# @yield [response, operation] Access the result along with the RPC operation
|
255
249
|
# @yieldparam response [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse]
|
@@ -279,7 +273,9 @@ module Google
|
|
279
273
|
options.apply_defaults timeout: @config.rpcs.synthesize_speech.timeout,
|
280
274
|
metadata: metadata,
|
281
275
|
retry_policy: @config.rpcs.synthesize_speech.retry_policy
|
282
|
-
|
276
|
+
|
277
|
+
options.apply_defaults timeout: @config.timeout,
|
278
|
+
metadata: @config.metadata,
|
283
279
|
retry_policy: @config.retry_policy
|
284
280
|
|
285
281
|
@text_to_speech_stub.call_rpc :synthesize_speech, request, options: options do |response, operation|
|
@@ -303,22 +299,21 @@ module Google
|
|
303
299
|
# Configuration can be applied globally to all clients, or to a single client
|
304
300
|
# on construction.
|
305
301
|
#
|
306
|
-
#
|
307
|
-
#
|
308
|
-
#
|
309
|
-
# to 20 seconds,
|
310
|
-
#
|
311
|
-
#
|
312
|
-
#
|
313
|
-
#
|
314
|
-
#
|
315
|
-
#
|
316
|
-
#
|
317
|
-
#
|
318
|
-
#
|
319
|
-
#
|
320
|
-
#
|
321
|
-
# end
|
302
|
+
# @example
|
303
|
+
#
|
304
|
+
# # Modify the global config, setting the timeout for
|
305
|
+
# # list_voices to 20 seconds,
|
306
|
+
# # and all remaining timeouts to 10 seconds.
|
307
|
+
# ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config|
|
308
|
+
# config.timeout = 10.0
|
309
|
+
# config.rpcs.list_voices.timeout = 20.0
|
310
|
+
# end
|
311
|
+
#
|
312
|
+
# # Apply the above configuration only to a new client.
|
313
|
+
# client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config|
|
314
|
+
# config.timeout = 10.0
|
315
|
+
# config.rpcs.list_voices.timeout = 20.0
|
316
|
+
# end
|
322
317
|
#
|
323
318
|
# @!attribute [rw] endpoint
|
324
319
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# Source: google/cloud/texttospeech/v1beta1/cloud_tts.proto for package 'Google.Cloud.TextToSpeech.V1beta1'
|
3
3
|
# Original file comments:
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2021 Google LLC
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -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
|
@@ -25,13 +25,14 @@ module Google
|
|
25
25
|
# @!attribute [rw] language_code
|
26
26
|
# @return [::String]
|
27
27
|
# Optional. Recommended.
|
28
|
-
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
|
29
|
-
# specified, the
|
30
|
-
#
|
31
|
-
#
|
28
|
+
# [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
|
29
|
+
# If not specified, the API will return all supported voices.
|
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", you will
|
32
|
+
# get supported "en-NZ" voices; when specifying "no", you will get supported
|
32
33
|
# "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices; specifying "zh"
|
33
34
|
# will also get supported "cmn-\*" voices; specifying "zh-hk" will also get
|
34
|
-
# supported "yue
|
35
|
+
# supported "yue-hk" voices.
|
35
36
|
class ListVoicesRequest
|
36
37
|
include ::Google::Protobuf::MessageExts
|
37
38
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -78,7 +79,7 @@ module Google
|
|
78
79
|
# Required. The configuration of the synthesized audio.
|
79
80
|
# @!attribute [rw] enable_time_pointing
|
80
81
|
# @return [::Array<::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest::TimepointType>]
|
81
|
-
# Whether and what timepoints
|
82
|
+
# Whether and what timepoints are returned in the response.
|
82
83
|
class SynthesizeSpeechRequest
|
83
84
|
include ::Google::Protobuf::MessageExts
|
84
85
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -266,6 +267,10 @@ module Google
|
|
266
267
|
# 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
|
267
268
|
# Audio content returned as MULAW also contains a WAV header.
|
268
269
|
MULAW = 5
|
270
|
+
|
271
|
+
# 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.
|
272
|
+
# Audio content returned as ALAW also contains a WAV header.
|
273
|
+
ALAW = 6
|
269
274
|
end
|
270
275
|
end
|
271
276
|
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.
|
4
|
+
version: 0.6.3
|
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-08-11 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
|