google-cloud-text_to_speech-v1 0.10.0 → 0.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12b04551b82e89ea8990ce8fd2cb38b3379d5ff68fbfe66b0ee321b93782e095
4
- data.tar.gz: 1b428d79bccf3edf8e39f057acf6017f12052b4972d94382777308153f1c1d75
3
+ metadata.gz: 2c24cf1a8a6717208ca78d15954c5c9b40faf53f543468b0c7de019abdd71145
4
+ data.tar.gz: 1c81eec6bd72b96c19597c3c8afa50a7c12b11c8ff053626096a6d176de2d6da
5
5
  SHA512:
6
- metadata.gz: 667114f04c9cf1b2f290a4357fc41f19754d143797bd54297f8ca96bc8cac3bdec1a2e737d13b3d4cf08861259c143a729a9b4958b0f13a82ccc2a254218b115
7
- data.tar.gz: 7121b3210bcdbf01747e2bcdde3e19a56f65fc93a210ed318f448e95c2b073e10effed14573f54bd1ef304db3f71c651eef49439bd1c57b42cb3082762123cf8
6
+ metadata.gz: '051213751561388b3851b060c64d76027301ed6efe7254c029febbd727c311bf6be4820f535f9c7caf5e351d2f857fbf8f32a4d8a1d09f95078c05d0a2bdd47f'
7
+ data.tar.gz: 00b53ad1683e5bbe8d72ed7283ad9d72c038143309cbc709ec94e53283cad8c543a1d5231b72a23dd75e4a372e5975c4074eb55432971b23f9d082e2bff16ef2
@@ -128,7 +128,7 @@ module Google
128
128
  credentials = @config.credentials
129
129
  # Use self-signed JWT if the endpoint is unchanged from default,
130
130
  # but only if the default endpoint does not have a region prefix.
131
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
132
132
  !@config.endpoint.split(".").first.include?("-")
133
133
  credentials ||= Credentials.default scope: @config.scope,
134
134
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -143,7 +143,8 @@ module Google
143
143
  credentials: credentials,
144
144
  endpoint: @config.endpoint,
145
145
  channel_args: @config.channel_args,
146
- interceptors: @config.interceptors
146
+ interceptors: @config.interceptors,
147
+ channel_pool_config: @config.channel_pool
147
148
  )
148
149
  end
149
150
 
@@ -397,7 +398,9 @@ module Google
397
398
  class Configuration
398
399
  extend ::Gapic::Config
399
400
 
400
- config_attr :endpoint, "texttospeech.googleapis.com", ::String
401
+ DEFAULT_ENDPOINT = "texttospeech.googleapis.com"
402
+
403
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
401
404
  config_attr :credentials, nil do |value|
402
405
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
403
406
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -432,6 +435,14 @@ module Google
432
435
  end
433
436
  end
434
437
 
438
+ ##
439
+ # Configuration for the channel pool
440
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
441
+ #
442
+ def channel_pool
443
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
444
+ end
445
+
435
446
  ##
436
447
  # Configuration RPC class for the TextToSpeech API.
437
448
  #
@@ -124,7 +124,7 @@ module Google
124
124
  credentials = @config.credentials
125
125
  # Use self-signed JWT if the endpoint is unchanged from default,
126
126
  # but only if the default endpoint does not have a region prefix.
127
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
127
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
128
128
  !@config.endpoint.split(".").first.include?("-")
129
129
  credentials ||= Credentials.default scope: @config.scope,
130
130
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -174,6 +174,22 @@ module Google
174
174
  # @return [::Google::Cloud::TextToSpeech::V1::ListVoicesResponse]
175
175
  #
176
176
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
177
+ #
178
+ # @example Basic example
179
+ # require "google/cloud/text_to_speech/v1"
180
+ #
181
+ # # Create a client object. The client can be reused for multiple calls.
182
+ # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new
183
+ #
184
+ # # Create a request. To set request fields, pass in keyword arguments.
185
+ # request = Google::Cloud::TextToSpeech::V1::ListVoicesRequest.new
186
+ #
187
+ # # Call the list_voices method.
188
+ # result = client.list_voices request
189
+ #
190
+ # # The returned object is of type Google::Cloud::TextToSpeech::V1::ListVoicesResponse.
191
+ # p result
192
+ #
177
193
  def list_voices request, options = nil
178
194
  raise ::ArgumentError, "request must be provided" if request.nil?
179
195
 
@@ -241,6 +257,22 @@ module Google
241
257
  # @return [::Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse]
242
258
  #
243
259
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
260
+ #
261
+ # @example Basic example
262
+ # require "google/cloud/text_to_speech/v1"
263
+ #
264
+ # # Create a client object. The client can be reused for multiple calls.
265
+ # client = Google::Cloud::TextToSpeech::V1::TextToSpeech::Rest::Client.new
266
+ #
267
+ # # Create a request. To set request fields, pass in keyword arguments.
268
+ # request = Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new
269
+ #
270
+ # # Call the synthesize_speech method.
271
+ # result = client.synthesize_speech request
272
+ #
273
+ # # The returned object is of type Google::Cloud::TextToSpeech::V1::SynthesizeSpeechResponse.
274
+ # p result
275
+ #
244
276
  def synthesize_speech request, options = nil
245
277
  raise ::ArgumentError, "request must be provided" if request.nil?
246
278
 
@@ -349,7 +381,9 @@ module Google
349
381
  class Configuration
350
382
  extend ::Gapic::Config
351
383
 
352
- config_attr :endpoint, "texttospeech.googleapis.com", ::String
384
+ DEFAULT_ENDPOINT = "texttospeech.googleapis.com"
385
+
386
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
353
387
  config_attr :credentials, nil do |value|
354
388
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
355
389
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_list_voices_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_synthesize_speech_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -125,7 +125,7 @@ module Google
125
125
  credentials = @config.credentials
126
126
  # Use self-signed JWT if the endpoint is unchanged from default,
127
127
  # but only if the default endpoint does not have a region prefix.
128
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
128
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
129
129
  !@config.endpoint.split(".").first.include?("-")
130
130
  credentials ||= Credentials.default scope: @config.scope,
131
131
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -146,7 +146,8 @@ module Google
146
146
  credentials: credentials,
147
147
  endpoint: @config.endpoint,
148
148
  channel_args: @config.channel_args,
149
- interceptors: @config.interceptors
149
+ interceptors: @config.interceptors,
150
+ channel_pool_config: @config.channel_pool
150
151
  )
151
152
  end
152
153
 
@@ -346,7 +347,9 @@ module Google
346
347
  class Configuration
347
348
  extend ::Gapic::Config
348
349
 
349
- config_attr :endpoint, "texttospeech.googleapis.com", ::String
350
+ DEFAULT_ENDPOINT = "texttospeech.googleapis.com"
351
+
352
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
350
353
  config_attr :credentials, nil do |value|
351
354
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
352
355
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -381,6 +384,14 @@ module Google
381
384
  end
382
385
  end
383
386
 
387
+ ##
388
+ # Configuration for the channel pool
389
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
390
+ #
391
+ def channel_pool
392
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
393
+ end
394
+
384
395
  ##
385
396
  # Configuration RPC class for the TextToSpeechLongAudioSynthesize API.
386
397
  #
@@ -93,7 +93,8 @@ module Google
93
93
  credentials: credentials,
94
94
  endpoint: @config.endpoint,
95
95
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
96
+ interceptors: @config.interceptors,
97
+ channel_pool_config: @config.channel_pool
97
98
  )
98
99
 
99
100
  # Used by an LRO wrapper for some methods of this service
@@ -664,7 +665,9 @@ module Google
664
665
  class Configuration
665
666
  extend ::Gapic::Config
666
667
 
667
- config_attr :endpoint, "texttospeech.googleapis.com", ::String
668
+ DEFAULT_ENDPOINT = "texttospeech.googleapis.com"
669
+
670
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
668
671
  config_attr :credentials, nil do |value|
669
672
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
670
673
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -699,6 +702,14 @@ module Google
699
702
  end
700
703
  end
701
704
 
705
+ ##
706
+ # Configuration for the channel pool
707
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
708
+ #
709
+ def channel_pool
710
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
711
+ end
712
+
702
713
  ##
703
714
  # Configuration RPC class for the Operations API.
704
715
  #
@@ -121,7 +121,7 @@ module Google
121
121
  credentials = @config.credentials
122
122
  # Use self-signed JWT if the endpoint is unchanged from default,
123
123
  # but only if the default endpoint does not have a region prefix.
124
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
124
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
125
125
  !@config.endpoint.split(".").first.include?("-")
126
126
  credentials ||= Credentials.default scope: @config.scope,
127
127
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -189,6 +189,29 @@ module Google
189
189
  # @return [::Gapic::Operation]
190
190
  #
191
191
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
192
+ #
193
+ # @example Basic example
194
+ # require "google/cloud/text_to_speech/v1"
195
+ #
196
+ # # Create a client object. The client can be reused for multiple calls.
197
+ # client = Google::Cloud::TextToSpeech::V1::TextToSpeechLongAudioSynthesize::Rest::Client.new
198
+ #
199
+ # # Create a request. To set request fields, pass in keyword arguments.
200
+ # request = Google::Cloud::TextToSpeech::V1::SynthesizeLongAudioRequest.new
201
+ #
202
+ # # Call the synthesize_long_audio method.
203
+ # result = client.synthesize_long_audio request
204
+ #
205
+ # # The returned object is of type Gapic::Operation. You can use it to
206
+ # # check the status of an operation, cancel it, or wait for results.
207
+ # # Here is how to wait for a response.
208
+ # result.wait_until_done! timeout: 60
209
+ # if result.response?
210
+ # p result.response
211
+ # else
212
+ # puts "No response received."
213
+ # end
214
+ #
192
215
  def synthesize_long_audio request, options = nil
193
216
  raise ::ArgumentError, "request must be provided" if request.nil?
194
217
 
@@ -298,7 +321,9 @@ module Google
298
321
  class Configuration
299
322
  extend ::Gapic::Config
300
323
 
301
- config_attr :endpoint, "texttospeech.googleapis.com", ::String
324
+ DEFAULT_ENDPOINT = "texttospeech.googleapis.com"
325
+
326
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
302
327
  config_attr :credentials, nil do |value|
303
328
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
304
329
  allowed.any? { |klass| klass === value }
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -446,7 +521,9 @@ module Google
446
521
  class Configuration
447
522
  extend ::Gapic::Config
448
523
 
449
- config_attr :endpoint, "texttospeech.googleapis.com", ::String
524
+ DEFAULT_ENDPOINT = "texttospeech.googleapis.com"
525
+
526
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
450
527
  config_attr :credentials, nil do |value|
451
528
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
452
529
  allowed.any? { |klass| klass === value }
@@ -567,7 +644,7 @@ module Google
567
644
 
568
645
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
569
646
  query_string_params = if query_string_params.any?
570
- query_string_params.to_h { |p| p.split("=", 2) }
647
+ query_string_params.to_h { |p| p.split "=", 2 }
571
648
  else
572
649
  {}
573
650
  end
@@ -605,7 +682,7 @@ module Google
605
682
 
606
683
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
607
684
  query_string_params = if query_string_params.any?
608
- query_string_params.to_h { |p| p.split("=", 2) }
685
+ query_string_params.to_h { |p| p.split "=", 2 }
609
686
  else
610
687
  {}
611
688
  end
@@ -643,7 +720,7 @@ module Google
643
720
 
644
721
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
645
722
  query_string_params = if query_string_params.any?
646
- query_string_params.to_h { |p| p.split("=", 2) }
723
+ query_string_params.to_h { |p| p.split "=", 2 }
647
724
  else
648
725
  {}
649
726
  end
@@ -681,7 +758,7 @@ module Google
681
758
 
682
759
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
683
760
  query_string_params = if query_string_params.any?
684
- query_string_params.to_h { |p| p.split("=", 2) }
761
+ query_string_params.to_h { |p| p.split "=", 2 }
685
762
  else
686
763
  {}
687
764
  end
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_synthesize_long_audio_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module TextToSpeech
23
23
  module V1
24
- VERSION = "0.10.0"
24
+ VERSION = "0.11.0"
25
25
  end
26
26
  end
27
27
  end
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-text_to_speech-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.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: 2023-05-31 00:00:00.000000000 Z
11
+ date: 2023-09-12 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.0
19
+ version: 0.20.0
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.19.0
29
+ version: 0.20.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  - !ruby/object:Gem::Version
227
227
  version: '0'
228
228
  requirements: []
229
- rubygems_version: 3.4.2
229
+ rubygems_version: 3.4.19
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: Synthesizes natural-sounding speech by applying powerful neural network models.