google-cloud-text_to_speech-v1beta1 0.9.1 → 0.10.1

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: b5857351981087b607bd1285257fb1df83c3a40c5d81e816b85ae47b71d57735
4
- data.tar.gz: 2c68fdc71315eb776588fd8a343a8b319860a3c8a32b06ca35eb59da7f873345
3
+ metadata.gz: 056e5a3b65183ab4d17972d530040540ba217fe83969a05100e4f90647e99000
4
+ data.tar.gz: dceca2fa3d6b9fd87cb2cb02624ec0c1b1fe1866424515b56a96d2912dfd2d6b
5
5
  SHA512:
6
- metadata.gz: 1096fdacf05e327218341dee6a4d6d1a9f8526e779a8272feb8efbbbef59f8ef87608216ac1d1885ee2b99ba07975f56d7cb6911156421917867fc3caaa90bb0
7
- data.tar.gz: 8c769305d9d2b48adc595a1ac153ce41bd2ab0b21e4a346cafa6a81513740941c971f140532a487e58a674f774da5db393de6a18a1c8754514e20dc1a1a4d933
6
+ metadata.gz: 36681ccc312e4c9a30536bca170df0f4dfc5e12fd1f30ebb6078327700180d257b7ac1b74aeba0eaab17cb759d8efdb8fc4760e332b225a6e4af777b0d7932fa
7
+ data.tar.gz: 97f0b174d92b7e718d1399513f13590d34d82ee9e409d5eda0fd9cb39d260d2a2f461669551d836c1fdb8ac0886267d905faf4629ef4912295488f2d59ea7a53
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud Text-to-Speech V1beta1 API
2
2
 
3
- API Client library for the Cloud Text-to-Speech V1beta1 API
3
+ Synthesizes natural-sounding speech by applying powerful neural network models.
4
4
 
5
5
  Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech.
6
6
 
@@ -47,7 +47,7 @@ for general usage information.
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
49
  The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest"
20
+ require "google/cloud/text_to_speech/v1beta1/text_to_speech_long_audio_synthesize/rest"
21
+ require "google/cloud/text_to_speech/v1beta1/version"
22
+
23
+ module Google
24
+ module Cloud
25
+ module TextToSpeech
26
+ ##
27
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
28
+ #
29
+ # @example
30
+ #
31
+ # require "google/cloud/text_to_speech/v1beta1/rest"
32
+ # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new
33
+ #
34
+ module V1beta1
35
+ end
36
+ end
37
+ end
38
+ end
@@ -355,9 +355,9 @@ module Google
355
355
  # * (`String`) The path to a service account key file in JSON format
356
356
  # * (`Hash`) A service account key as a Hash
357
357
  # * (`Google::Auth::Credentials`) A googleauth credentials object
358
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
358
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
359
359
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
360
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
360
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
361
361
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
362
362
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
363
363
  # * (`nil`) indicating no credentials
@@ -0,0 +1,432 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "google/cloud/errors"
20
+ require "google/cloud/texttospeech/v1beta1/cloud_tts_pb"
21
+ require "google/cloud/text_to_speech/v1beta1/text_to_speech/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module TextToSpeech
26
+ module V1beta1
27
+ module TextToSpeech
28
+ module Rest
29
+ ##
30
+ # REST client for the TextToSpeech service.
31
+ #
32
+ # Service that implements Google Cloud Text-to-Speech API.
33
+ #
34
+ class Client
35
+ include Paths
36
+
37
+ # @private
38
+ attr_reader :text_to_speech_stub
39
+
40
+ ##
41
+ # Configure the TextToSpeech Client class.
42
+ #
43
+ # See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client::Configuration}
44
+ # for a description of the configuration fields.
45
+ #
46
+ # @example
47
+ #
48
+ # # Modify the configuration for all TextToSpeech clients
49
+ # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
52
+ #
53
+ # @yield [config] Configure the Client client.
54
+ # @yieldparam config [Client::Configuration]
55
+ #
56
+ # @return [Client::Configuration]
57
+ #
58
+ def self.configure
59
+ @configure ||= begin
60
+ namespace = ["Google", "Cloud", "TextToSpeech", "V1beta1"]
61
+ parent_config = while namespace.any?
62
+ parent_name = namespace.join "::"
63
+ parent_const = const_get parent_name
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
+ namespace.pop
66
+ end
67
+ default_config = Client::Configuration.new parent_config
68
+
69
+ default_config.timeout = 300.0
70
+ default_config.retry_policy = {
71
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
72
+ }
73
+
74
+ default_config
75
+ end
76
+ yield @configure if block_given?
77
+ @configure
78
+ end
79
+
80
+ ##
81
+ # Configure the TextToSpeech Client instance.
82
+ #
83
+ # The configuration is set to the derived mode, meaning that values can be changed,
84
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
85
+ # should be made on {Client.configure}.
86
+ #
87
+ # See {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client::Configuration}
88
+ # for a description of the configuration fields.
89
+ #
90
+ # @yield [config] Configure the Client client.
91
+ # @yieldparam config [Client::Configuration]
92
+ #
93
+ # @return [Client::Configuration]
94
+ #
95
+ def configure
96
+ yield @config if block_given?
97
+ @config
98
+ end
99
+
100
+ ##
101
+ # Create a new TextToSpeech REST client object.
102
+ #
103
+ # @example
104
+ #
105
+ # # Create a client using the default configuration
106
+ # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new
107
+ #
108
+ # # Create a client using a custom configuration
109
+ # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new do |config|
110
+ # config.timeout = 10.0
111
+ # end
112
+ #
113
+ # @yield [config] Configure the TextToSpeech client.
114
+ # @yieldparam config [Client::Configuration]
115
+ #
116
+ def initialize
117
+ # Create the configuration object
118
+ @config = Configuration.new Client.configure
119
+
120
+ # Yield the configuration if needed
121
+ yield @config if block_given?
122
+
123
+ # Create credentials
124
+ credentials = @config.credentials
125
+ # Use self-signed JWT if the endpoint is unchanged from default,
126
+ # but only if the default endpoint does not have a region prefix.
127
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
128
+ !@config.endpoint.split(".").first.include?("-")
129
+ credentials ||= Credentials.default scope: @config.scope,
130
+ enable_self_signed_jwt: enable_self_signed_jwt
131
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
132
+ credentials = Credentials.new credentials, scope: @config.scope
133
+ end
134
+
135
+ @quota_project_id = @config.quota_project
136
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
137
+
138
+ @text_to_speech_stub = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
139
+ end
140
+
141
+ # Service calls
142
+
143
+ ##
144
+ # Returns a list of Voice supported for synthesis.
145
+ #
146
+ # @overload list_voices(request, options = nil)
147
+ # Pass arguments to `list_voices` via a request object, either of type
148
+ # {::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest} or an equivalent Hash.
149
+ #
150
+ # @param request [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest, ::Hash]
151
+ # A request object representing the call parameters. Required. To specify no
152
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
153
+ # @param options [::Gapic::CallOptions, ::Hash]
154
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
155
+ #
156
+ # @overload list_voices(language_code: nil)
157
+ # Pass arguments to `list_voices` via keyword arguments. Note that at
158
+ # least one keyword argument is required. To specify no parameters, or to keep all
159
+ # the default parameter values, pass an empty Hash as a request object (see above).
160
+ #
161
+ # @param language_code [::String]
162
+ # Optional. Recommended.
163
+ # [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
164
+ # If not specified, the API will return all supported voices.
165
+ # If specified, the ListVoices call will only return voices that can be used
166
+ # to synthesize this language_code. For example, if you specify `"en-NZ"`,
167
+ # all `"en-NZ"` voices will be returned. If you specify `"no"`, both
168
+ # `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
169
+ # returned.
170
+ # @yield [result, operation] Access the result along with the TransportOperation object
171
+ # @yieldparam result [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse]
172
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
173
+ #
174
+ # @return [::Google::Cloud::TextToSpeech::V1beta1::ListVoicesResponse]
175
+ #
176
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
177
+ def list_voices request, options = nil
178
+ raise ::ArgumentError, "request must be provided" if request.nil?
179
+
180
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::ListVoicesRequest
181
+
182
+ # Converts hash and nil to an options object
183
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
184
+
185
+ # Customize the options with defaults
186
+ call_metadata = @config.rpcs.list_voices.metadata.to_h
187
+
188
+ # Set x-goog-api-client and x-goog-user-project headers
189
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
190
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
191
+ gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::VERSION,
192
+ transports_version_send: [:rest]
193
+
194
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
195
+
196
+ options.apply_defaults timeout: @config.rpcs.list_voices.timeout,
197
+ metadata: call_metadata,
198
+ retry_policy: @config.rpcs.list_voices.retry_policy
199
+
200
+ options.apply_defaults timeout: @config.timeout,
201
+ metadata: @config.metadata,
202
+ retry_policy: @config.retry_policy
203
+
204
+ @text_to_speech_stub.list_voices request, options do |result, operation|
205
+ yield result, operation if block_given?
206
+ return result
207
+ end
208
+ rescue ::Gapic::Rest::Error => e
209
+ raise ::Google::Cloud::Error.from_error(e)
210
+ end
211
+
212
+ ##
213
+ # Synthesizes speech synchronously: receive results after all text input
214
+ # has been processed.
215
+ #
216
+ # @overload synthesize_speech(request, options = nil)
217
+ # Pass arguments to `synthesize_speech` via a request object, either of type
218
+ # {::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest} or an equivalent Hash.
219
+ #
220
+ # @param request [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest, ::Hash]
221
+ # A request object representing the call parameters. Required. To specify no
222
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
223
+ # @param options [::Gapic::CallOptions, ::Hash]
224
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
225
+ #
226
+ # @overload synthesize_speech(input: nil, voice: nil, audio_config: nil, enable_time_pointing: nil)
227
+ # Pass arguments to `synthesize_speech` via keyword arguments. Note that at
228
+ # least one keyword argument is required. To specify no parameters, or to keep all
229
+ # the default parameter values, pass an empty Hash as a request object (see above).
230
+ #
231
+ # @param input [::Google::Cloud::TextToSpeech::V1beta1::SynthesisInput, ::Hash]
232
+ # Required. The Synthesizer requires either plain text or SSML as input.
233
+ # @param voice [::Google::Cloud::TextToSpeech::V1beta1::VoiceSelectionParams, ::Hash]
234
+ # Required. The desired voice of the synthesized audio.
235
+ # @param audio_config [::Google::Cloud::TextToSpeech::V1beta1::AudioConfig, ::Hash]
236
+ # Required. The configuration of the synthesized audio.
237
+ # @param enable_time_pointing [::Array<::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest::TimepointType>]
238
+ # Whether and what timepoints are returned in the response.
239
+ # @yield [result, operation] Access the result along with the TransportOperation object
240
+ # @yieldparam result [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse]
241
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
242
+ #
243
+ # @return [::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechResponse]
244
+ #
245
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
246
+ def synthesize_speech request, options = nil
247
+ raise ::ArgumentError, "request must be provided" if request.nil?
248
+
249
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::TextToSpeech::V1beta1::SynthesizeSpeechRequest
250
+
251
+ # Converts hash and nil to an options object
252
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
253
+
254
+ # Customize the options with defaults
255
+ call_metadata = @config.rpcs.synthesize_speech.metadata.to_h
256
+
257
+ # Set x-goog-api-client and x-goog-user-project headers
258
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
259
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
260
+ gapic_version: ::Google::Cloud::TextToSpeech::V1beta1::VERSION,
261
+ transports_version_send: [:rest]
262
+
263
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
264
+
265
+ options.apply_defaults timeout: @config.rpcs.synthesize_speech.timeout,
266
+ metadata: call_metadata,
267
+ retry_policy: @config.rpcs.synthesize_speech.retry_policy
268
+
269
+ options.apply_defaults timeout: @config.timeout,
270
+ metadata: @config.metadata,
271
+ retry_policy: @config.retry_policy
272
+
273
+ @text_to_speech_stub.synthesize_speech request, options do |result, operation|
274
+ yield result, operation if block_given?
275
+ return result
276
+ end
277
+ rescue ::Gapic::Rest::Error => e
278
+ raise ::Google::Cloud::Error.from_error(e)
279
+ end
280
+
281
+ ##
282
+ # Configuration class for the TextToSpeech REST API.
283
+ #
284
+ # This class represents the configuration for TextToSpeech REST,
285
+ # providing control over timeouts, retry behavior, logging, transport
286
+ # parameters, and other low-level controls. Certain parameters can also be
287
+ # applied individually to specific RPCs. See
288
+ # {::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client::Configuration::Rpcs}
289
+ # for a list of RPCs that can be configured independently.
290
+ #
291
+ # Configuration can be applied globally to all clients, or to a single client
292
+ # on construction.
293
+ #
294
+ # @example
295
+ #
296
+ # # Modify the global config, setting the timeout for
297
+ # # list_voices to 20 seconds,
298
+ # # and all remaining timeouts to 10 seconds.
299
+ # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.configure do |config|
300
+ # config.timeout = 10.0
301
+ # config.rpcs.list_voices.timeout = 20.0
302
+ # end
303
+ #
304
+ # # Apply the above configuration only to a new client.
305
+ # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Rest::Client.new do |config|
306
+ # config.timeout = 10.0
307
+ # config.rpcs.list_voices.timeout = 20.0
308
+ # end
309
+ #
310
+ # @!attribute [rw] endpoint
311
+ # The hostname or hostname:port of the service endpoint.
312
+ # Defaults to `"texttospeech.googleapis.com"`.
313
+ # @return [::String]
314
+ # @!attribute [rw] credentials
315
+ # Credentials to send with calls. You may provide any of the following types:
316
+ # * (`String`) The path to a service account key file in JSON format
317
+ # * (`Hash`) A service account key as a Hash
318
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
319
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
320
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
321
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
322
+ # * (`nil`) indicating no credentials
323
+ # @return [::Object]
324
+ # @!attribute [rw] scope
325
+ # The OAuth scopes
326
+ # @return [::Array<::String>]
327
+ # @!attribute [rw] lib_name
328
+ # The library name as recorded in instrumentation and logging
329
+ # @return [::String]
330
+ # @!attribute [rw] lib_version
331
+ # The library version as recorded in instrumentation and logging
332
+ # @return [::String]
333
+ # @!attribute [rw] timeout
334
+ # The call timeout in seconds.
335
+ # @return [::Numeric]
336
+ # @!attribute [rw] metadata
337
+ # Additional headers to be sent with the call.
338
+ # @return [::Hash{::Symbol=>::String}]
339
+ # @!attribute [rw] retry_policy
340
+ # The retry policy. The value is a hash with the following keys:
341
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
342
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
343
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
344
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
345
+ # trigger a retry.
346
+ # @return [::Hash]
347
+ # @!attribute [rw] quota_project
348
+ # A separate project against which to charge quota.
349
+ # @return [::String]
350
+ #
351
+ class Configuration
352
+ extend ::Gapic::Config
353
+
354
+ config_attr :endpoint, "texttospeech.googleapis.com", ::String
355
+ config_attr :credentials, nil do |value|
356
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
357
+ allowed.any? { |klass| klass === value }
358
+ end
359
+ config_attr :scope, nil, ::String, ::Array, nil
360
+ config_attr :lib_name, nil, ::String, nil
361
+ config_attr :lib_version, nil, ::String, nil
362
+ config_attr :timeout, nil, ::Numeric, nil
363
+ config_attr :metadata, nil, ::Hash, nil
364
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
365
+ config_attr :quota_project, nil, ::String, nil
366
+
367
+ # @private
368
+ def initialize parent_config = nil
369
+ @parent_config = parent_config unless parent_config.nil?
370
+
371
+ yield self if block_given?
372
+ end
373
+
374
+ ##
375
+ # Configurations for individual RPCs
376
+ # @return [Rpcs]
377
+ #
378
+ def rpcs
379
+ @rpcs ||= begin
380
+ parent_rpcs = nil
381
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
382
+ Rpcs.new parent_rpcs
383
+ end
384
+ end
385
+
386
+ ##
387
+ # Configuration RPC class for the TextToSpeech API.
388
+ #
389
+ # Includes fields providing the configuration for each RPC in this service.
390
+ # Each configuration object is of type `Gapic::Config::Method` and includes
391
+ # the following configuration fields:
392
+ #
393
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
394
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
395
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
396
+ # include the following keys:
397
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
398
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
399
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
400
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
401
+ # trigger a retry.
402
+ #
403
+ class Rpcs
404
+ ##
405
+ # RPC-specific configuration for `list_voices`
406
+ # @return [::Gapic::Config::Method]
407
+ #
408
+ attr_reader :list_voices
409
+ ##
410
+ # RPC-specific configuration for `synthesize_speech`
411
+ # @return [::Gapic::Config::Method]
412
+ #
413
+ attr_reader :synthesize_speech
414
+
415
+ # @private
416
+ def initialize parent_rpcs = nil
417
+ list_voices_config = parent_rpcs.list_voices if parent_rpcs.respond_to? :list_voices
418
+ @list_voices = ::Gapic::Config::Method.new list_voices_config
419
+ synthesize_speech_config = parent_rpcs.synthesize_speech if parent_rpcs.respond_to? :synthesize_speech
420
+ @synthesize_speech = ::Gapic::Config::Method.new synthesize_speech_config
421
+
422
+ yield self if block_given?
423
+ end
424
+ end
425
+ end
426
+ end
427
+ end
428
+ end
429
+ end
430
+ end
431
+ end
432
+ end