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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72bac56cdb10fb18eae8c024ff406096a4a0daefaaac7d959b64742ef6bc7ed9
4
- data.tar.gz: 229bb7614e0b071c734463a81184263cb78d2449972782d2061fa08e0d42c7bf
3
+ metadata.gz: eb487510f962673ad23d8d1848f70f1123ef38200e00b0c069b186b454898d7f
4
+ data.tar.gz: '093af08eed710febc918104cb50cd3941c6e68dc9e05f1a21f2a2f457e9504e3'
5
5
  SHA512:
6
- metadata.gz: 513cd9312dc6d36676da8843a61736d5afe16bb9c1623df277eee0ff4e576d44555686ef582af05f596d2169ddcc109f96ab74f550b45c83756b6b2dbadab4fd
7
- data.tar.gz: '0293fca8805aa2a5c7e05dbe7dc4264600caa7850769b875885b88045fa0178e773e62cfdd9741cea5702dde3123f026a3906702eb95e31f425f7c99175c21e7'
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
- 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
@@ -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. If
180
- # specified, the ListVoices call will only return voices that can be used to
181
- # synthesize this language_code. E.g. when specifying "en-NZ", you will get
182
- # supported "en-\*" voices; when specifying "no", you will get supported
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-\*" voices.
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
- options.apply_defaults metadata: @config.metadata,
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 should be returned in the response.
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
- options.apply_defaults metadata: @config.metadata,
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
- # # Examples
307
- #
308
- # To modify the global config, setting the timeout for list_voices
309
- # to 20 seconds, and all remaining timeouts to 10 seconds:
310
- #
311
- # ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.configure do |config|
312
- # config.timeout = 10.0
313
- # config.rpcs.list_voices.timeout = 20.0
314
- # end
315
- #
316
- # To apply the above configuration only to a new client:
317
- #
318
- # client = ::Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client.new do |config|
319
- # config.timeout = 10.0
320
- # config.rpcs.list_voices.timeout = 20.0
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.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module TextToSpeech
23
23
  module V1beta1
24
- VERSION = "0.5.0"
24
+ VERSION = "0.6.3"
25
25
  end
26
26
  end
27
27
  end
@@ -71,6 +71,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
71
71
  value :MP3_64_KBPS, 4
72
72
  value :OGG_OPUS, 3
73
73
  value :MULAW, 5
74
+ value :ALAW, 6
74
75
  end
75
76
  end
76
77
  end
@@ -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 2019 Google LLC.
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 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
@@ -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. If
29
- # specified, the ListVoices call will only return voices that can be used to
30
- # synthesize this language_code. E.g. when specifying "en-NZ", you will get
31
- # supported "en-\*" voices; when specifying "no", you will get supported
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-\*" voices.
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 should be returned in the response.
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.5.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-03-08 00:00:00.000000000 Z
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: '0.3'
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.3'
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