google-cloud-text_to_speech-v1beta1 0.6.0 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f956d3c94f4b9717fbf1f06cfd3b79b862c2c477bb632543cf54fd23e5fe962
4
- data.tar.gz: 55ca0190c1a50e9c9f1afbc6fdb8d24b3d53838ab4de40ea6803d96af9c1f793
3
+ metadata.gz: c08f170eb3ebf2568108d4c70a535f00a42735d0bea20a54e29bec9ec4a25a2b
4
+ data.tar.gz: 0db345725c656fbe3310a5d2034522e0256afc656f1c2a94b765e3b43fb517ea
5
5
  SHA512:
6
- metadata.gz: 26a0bb3d8c11a0d1299f2aae6d8074f5adcc9fe981740be136a7c0fec72cd82a91b52d569aa2ee3a02463ad04be88c45eca3ac0ded1a603ce132591b4a1fa758
7
- data.tar.gz: '070794312482de11b0b47c3f0056753f2d6ad245652185e627fe5a538f91153d445e4c48e2627f57dbfebf2e5c56f6c1c275d816beb4742bce93396fbdc93b86'
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
- 1. `TEXTTOSPEECH_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `TEXTTOSPEECH_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
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 placing them in
86
- environment variables. Either on an individual client initialization:
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 configured globally for all clients:
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 = my_create_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
- # ## Example
42
+ # @example
43
43
  #
44
- # To modify the configuration for all TextToSpeech clients:
45
- #
46
- # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config|
47
- # config.timeout = 10.0
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
- # ## Examples
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
- # To create a new TextToSpeech client with a custom
111
- # configuration:
101
+ # # Create a client using the default configuration
102
+ # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new
112
103
  #
113
- # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config|
114
- # config.timeout = 10.0
115
- # end
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 scope and endpoint are unchanged from default,
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.scope == Client.configure.scope &&
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
- options.apply_defaults metadata: @config.metadata,
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
- options.apply_defaults metadata: @config.metadata,
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
- # # Examples
308
- #
309
- # To modify the global config, setting the timeout for list_voices
310
- # to 20 seconds, and all remaining timeouts to 10 seconds:
311
- #
312
- # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config|
313
- # config.timeout = 10.0
314
- # config.rpcs.list_voices.timeout = 20.0
315
- # end
316
- #
317
- # To apply the above configuration only to a new client:
318
- #
319
- # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config|
320
- # config.timeout = 10.0
321
- # config.rpcs.list_voices.timeout = 20.0
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.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module TextToSpeech
23
23
  module V1beta1
24
- VERSION = "0.6.0"
24
+ VERSION = "0.6.4"
25
25
  end
26
26
  end
27
27
  end
@@ -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
@@ -27,7 +27,7 @@ module Google
27
27
  # Service that implements Google Cloud Text-to-Speech API.
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -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 order, rather than the order the user originally
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.0
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-04-05 00:00:00.000000000 Z
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: '0.4'
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: '0.4'
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.13
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