google-cloud-text_to_speech 1.8.0 → 2.0.0

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: 3859515c7082d2e991df7e57747f206d83ba45bdcdc2d11e393dac63ec2a783d
4
- data.tar.gz: 8e7cbf25e6bd8b4d6ed578e4a1406ab73df7c8155f4dea708a1b7985dca831ad
3
+ metadata.gz: 1436519731d29f18659d9837cbdf11887f9b03b694d11421352553e5702dfa77
4
+ data.tar.gz: a4c6971d94a1a7ba0c7bb708b2647ed9bc3b6744cd3c2046c63394c9e33d5af2
5
5
  SHA512:
6
- metadata.gz: 1a15675ab9ddda2a30973b6030204c37a17a2ec2dfd3538138dc2596385a8752672bb52bee54be85e60c3d4613ebb4e22d163678ace102d2daa6fad2b50759c0
7
- data.tar.gz: ebe42c42dc4240ed8bd78a749f202784171f12c3ae88ce3aa51fa1f3818d1abb3ff7d5950a5a5baa7b680c6e4d84c4717f15b3e8080298f9f335006dcae3396c
6
+ metadata.gz: a8d42060ebf6e82cb317b6ea6b9d696b95402c73be7eceb7c7cc2124b1801abf53384949225e319ef3106140a77fa835f4082c9861efba46342720baa2623084
7
+ data.tar.gz: c1650f6d660b006b49a7f999d0d1843edfc602a0432cdb9e279f87113229dd0be96788be433d2c6dbb720bffecb625236aa8edca3651d4fd7bf393d13f63e1dd
data/.yardopts CHANGED
@@ -8,5 +8,4 @@
8
8
  -
9
9
  README.md
10
10
  AUTHENTICATION.md
11
- MIGRATING.md
12
11
  LICENSE.md
data/README.md CHANGED
@@ -16,8 +16,7 @@ for this library, google-cloud-text_to_speech, to see the convenience methods fo
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-text_to_speech-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest),
20
- [google-cloud-text_to_speech-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1beta1/latest).
19
+ [google-cloud-text_to_speech-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest).
21
20
 
22
21
  See also the [Product Documentation](https://cloud.google.com/text-to-speech)
23
22
  for more usage information.
@@ -35,14 +34,6 @@ In order to use this library, you first need to go through the following steps:
35
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/texttospeech.googleapis.com)
36
35
  1. {file:AUTHENTICATION.md Set up authentication.}
37
36
 
38
- ## Migrating from 0.x versions
39
-
40
- The 1.0 release of the google-cloud-text_to_speech client is a significant upgrade
41
- based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
42
- and includes substantial interface changes. Existing code written for earlier
43
- versions of this library will likely require updates to use this version.
44
- See the {file:MIGRATING.md MIGRATING.md} document for more information.
45
-
46
37
  ## Debug Logging
47
38
 
48
39
  This library comes with opt-in Debug Logging that can help you troubleshoot
@@ -71,8 +62,7 @@ results in logs appearing alongside your application logs in the
71
62
  Debug logging also requires that the versioned clients for this service be
72
63
  sufficiently recent, released after about Dec 10, 2024. If logging is not
73
64
  working, try updating the versioned clients in your bundle or installed gems:
74
- [google-cloud-text_to_speech-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest),
75
- [google-cloud-text_to_speech-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1beta1/latest).
65
+ [google-cloud-text_to_speech-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-text_to_speech-v1/latest).
76
66
 
77
67
  ## Supported Ruby Versions
78
68
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module TextToSpeech
23
- VERSION = "1.8.0"
23
+ VERSION = "2.0.0"
24
24
  end
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-text_to_speech
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-29 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: google-cloud-core
@@ -27,42 +27,16 @@ dependencies:
27
27
  name: google-cloud-text_to_speech-v1
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0.12'
33
- - - "<"
34
- - !ruby/object:Gem::Version
35
- version: 2.a
36
- type: :runtime
37
- prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: '0.12'
43
- - - "<"
44
- - !ruby/object:Gem::Version
45
- version: 2.a
46
- - !ruby/object:Gem::Dependency
47
- name: google-cloud-text_to_speech-v1beta1
48
- requirement: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: '0.13'
53
- - - "<"
30
+ - - "~>"
54
31
  - !ruby/object:Gem::Version
55
- version: 2.a
32
+ version: '1.7'
56
33
  type: :runtime
57
34
  prerelease: false
58
35
  version_requirements: !ruby/object:Gem::Requirement
59
36
  requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0.13'
63
- - - "<"
37
+ - - "~>"
64
38
  - !ruby/object:Gem::Version
65
- version: 2.a
39
+ version: '1.7'
66
40
  description: Text-to-Speech converts text or Speech Synthesis Markup Language (SSML)
67
41
  input into audio data of natural human speech.
68
42
  email: googleapis-packages@google.com
@@ -73,7 +47,6 @@ files:
73
47
  - ".yardopts"
74
48
  - AUTHENTICATION.md
75
49
  - LICENSE.md
76
- - MIGRATING.md
77
50
  - README.md
78
51
  - lib/google-cloud-text_to_speech.rb
79
52
  - lib/google/cloud/text_to_speech.rb
@@ -96,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
69
  - !ruby/object:Gem::Version
97
70
  version: '0'
98
71
  requirements: []
99
- rubygems_version: 3.6.2
72
+ rubygems_version: 3.6.3
100
73
  specification_version: 4
101
74
  summary: API Client library for the Cloud Text-to-Speech API
102
75
  test_files: []
data/MIGRATING.md DELETED
@@ -1,281 +0,0 @@
1
- ## Migrating to google-cloud-text_to_speech 1.0
2
-
3
- The 1.0 release of the google-cloud-text_to_speech client is a significant upgrade
4
- based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
5
- and includes substantial interface changes. Existing code written for earlier
6
- versions of this library will likely require updates to use this version.
7
- This document describes the changes that have been made, and what you need to
8
- do to update your usage.
9
-
10
- To summarize:
11
-
12
- * The library has been broken out into three libraries. The new gems
13
- `google-cloud-text_to_speech-v1` and `google-cloud-text_to_speech-v1beta1` contain the
14
- actual client classes for versions V1 and V1beta1 of the Text To Speech
15
- service, and the gem `google-cloud-text_to_speech` now simply provides a
16
- convenience wrapper. See [Library Structure](#library-structure) for more
17
- info.
18
- * The library uses a new configuration mechanism giving you closer control
19
- over endpoint address, network timeouts, and retry. See
20
- [Client Configuration](#client-configuration) for more info. Furthermore,
21
- when creating a client object, you can customize its configuration in a
22
- block rather than passing arguments to the constructor. See
23
- [Creating Clients](#creating-clients) for more info.
24
- * Previously, positional arguments were used to indicate required arguments.
25
- Now, all method arguments are keyword arguments, with documentation that
26
- specifies whether they are required or optional. Additionally, you can pass
27
- a proto request object instead of separate arguments. See
28
- [Passing Arguments](#passing-arguments) for more info.
29
- * Previously, clients reported RPC errors by raising instances of
30
- `Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
31
- `Google::Cloud::Error` and its subclasses. See
32
- [Handling Errors](#handling-errors) for more info.
33
- * Some classes have moved into different namespaces. See
34
- [Class Namespaces](#class-namespaces) for more info.
35
-
36
- ### Library Structure
37
-
38
- Older 0.x releases of the `google-cloud-text_to_speech` gem were all-in-one gems that
39
- included potentially multiple clients for multiple versions of the Text To
40
- Speech service. The `Google::Cloud::TextToSpeech.new` factory method would
41
- return you an instance of a `Google::Cloud::TextToSpeech::V1::TextToSpeechClient`
42
- object for the V1 version of the service, or a
43
- `Google::Cloud::TextToSpeech::V1beta1::TextToSpeechClient` object for the
44
- V1beta1 version of the service. All these classes were defined in the same gem.
45
-
46
- With the 1.0 release, the `google-cloud-text_to_speech` gem still provides factory
47
- methods for obtaining clients. (The method signatures will have changed. See
48
- [Creating Clients](#creating-clients) for details.) However, the actual client
49
- classes have been moved into separate gems, one per service version. The
50
- `Google::Cloud::TextToSpeech::V1::TextToSpeech::Client` class, along with its
51
- helpers and data types, is now part of the `google-cloud-text_to_speech-v1` gem.
52
- Similarly, the `Google::Cloud::TextToSpeech::V1beta1::TextToSpeech::Client`
53
- class is part of the `google-cloud-text_to_speech-v1beta1` gem.
54
-
55
- For normal usage, you can continue to install the `google-cloud-text_to_speech` gem
56
- (which will bring in the versioned client gems as dependencies) and continue to
57
- use factory methods to create clients. However, you may alternatively choose to
58
- install only one of the versioned gems. For example, if you know you will use only
59
- `V1` of the service, you can install `google-cloud-text_to_speech-v1` by itself, and
60
- construct instances of the
61
- `Google::Cloud::TextToSpeech::V1::TextToSpeech::Client` client class directly.
62
-
63
- ### Client Configuration
64
-
65
- In older releases, if you wanted to customize performance parameters or
66
- low-level behavior of the client (such as credentials, timeouts, or
67
- instrumentation), you would pass a variety of keyword arguments to the client
68
- constructor. It was also extremely difficult to customize the default settings.
69
-
70
- With the 1.0 release, a configuration interface provides control over these
71
- parameters, including defaults for all instances of a client, and settings for
72
- each specific client instance. For example, to set default credentials and
73
- timeout for all Text To Speech V1 clients:
74
-
75
- ```
76
- Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.configure do |config|
77
- config.credentials = "/path/to/credentials.json"
78
- config.timeout = 10.0
79
- end
80
- ```
81
-
82
- Individual RPCs can also be configured independently. For example, to set the
83
- timeout for the `list_voices` call:
84
-
85
- ```
86
- Google::Cloud::TextToSpeech::V1::TextToSpeech::Client.configure do |config|
87
- config.rpcs.list_voices.timeout = 20.0
88
- end
89
- ```
90
-
91
- Defaults for certain configurations can be set for all Text To Speech versions
92
- globally:
93
-
94
- ```
95
- Google::Cloud::TextToSpeech.configure do |config|
96
- config.credentials = "/path/to/credentials.json"
97
- config.timeout = 10.0
98
- end
99
- ```
100
-
101
- Finally, you can override the configuration for each client instance. See the
102
- next section on [Creating Clients](#creating-clients) for details.
103
-
104
- ### Creating Clients
105
-
106
- In older releases, to create a client object, you would use the
107
- `Google::Cloud::TextToSpeech.new` class method. Keyword arguments were available to
108
- select a service version and to configure parameters such as credentials and
109
- timeouts.
110
-
111
- With the 1.0 release, use the `Google::Cloud::TextToSpeech.text_to_speech` class
112
- method to create a client object. You may select a service version using the
113
- `:version` keyword argument. However, other configuration parameters should be
114
- set in a configuration block when you create the client.
115
-
116
- Old:
117
- ```
118
- client = Google::Cloud::TextToSpeech.new credentials: "/path/to/credentials.json"
119
- ```
120
-
121
- New:
122
- ```
123
- client = Google::Cloud::TextToSpeech.text_to_speech do |config|
124
- config.credentials = "/path/to/credentials.json"
125
- end
126
- ```
127
-
128
- The configuration block is optional. If you do not provide it, or you do not
129
- set some configuration parameters, then the default configuration is used. See
130
- [Client Configuration](#client-configuration).
131
-
132
- ### Passing Arguments
133
-
134
- In older releases, required arguments would be passed as positional method
135
- arguments, while most optional arguments would be passed as keyword arguments.
136
-
137
- With the 1.0 release, all RPC arguments are passed as keyword arguments,
138
- regardless of whether they are required or optional. For example:
139
-
140
- Old:
141
- ```
142
- client = Google::Cloud::TextToSpeech.new
143
-
144
- input = { text: "Hello, world!" }
145
- voice = { language_code: "en-US" }
146
- audio = { audio_encoding: Google::Cloud::Texttospeech::V1::AudioEncoding::MP3 }
147
-
148
- # The three arguments are all positional.
149
- response = client.synthesize_speech input, voice, audio
150
- ```
151
-
152
- New:
153
- ```
154
- client = Google::Cloud::TextToSpeech.text_to_speech
155
-
156
- input = { text: "Hello, world!" }
157
- voice = { language_code: "en-US" }
158
- audio = { audio_encoding: Google::Cloud::TextToSpeech::V1::AudioEncoding::MP3 }
159
-
160
- # The three arguments are all keyword arguments.
161
- response = client.synthesize_speech input: input, voice: voice, audio_config: audio
162
- ```
163
-
164
- In the 1.0 release, it is also possible to pass a request object, either
165
- as a hash or as a protocol buffer.
166
-
167
- New:
168
- ```
169
- client = Google::Cloud::TextToSpeech.text_to_speech
170
-
171
- request = Google::Cloud::TextToSpeech::V1::SynthesizeSpeechRequest.new(
172
- input: { text: "Hello, world!" },
173
- voice: { language_code: "en-US" },
174
- audio: { audio_encoding: Google::Cloud::TextToSpeech::V1::AudioEncoding::MP3 }
175
- )
176
-
177
- # Pass a request object as a positional argument:
178
- response = client.synthesize_speech request
179
- ```
180
-
181
- Finally, in older releases, to provide call options, you would pass a
182
- `Google::Gax::CallOptions` object with the `:options` keyword argument. In the
183
- 1.0 release, pass call options using a _second set_ of keyword arguments.
184
-
185
- Old:
186
- ```
187
- client = Google::Cloud::TextToSpeech.new
188
-
189
- input = { text: "Hello, world!" }
190
- voice = { language_code: "en-US" }
191
- audio = { audio_encoding: Google::Cloud::TextToSpeech::V1::AudioEncoding::MP3 }
192
-
193
- options = Google::Gax::CallOptions.new timeout: 10.0
194
-
195
- response = client.synthesize_speech input, voice, audio, options: options
196
- ```
197
-
198
- New:
199
- ```
200
- client = Google::Cloud::TextToSpeech.text_to_speech
201
-
202
- input = { text: "Hello, world!" }
203
- voice = { language_code: "en-US" }
204
- audio = { audio_encoding: Google::Cloud::TextToSpeech::V1::AudioEncoding::MP3 }
205
-
206
- # Use a hash to wrap the normal call arguments (or pass a request object), and
207
- # then add further keyword arguments for the call options.
208
- response = client.synthesize_speech(
209
- { input: input, voice: voice, audio_config: audio },
210
- timeout: 10.0
211
- )
212
- ```
213
-
214
- ### Handling Errors
215
-
216
- The client reports standard
217
- [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
218
- by raising exceptions. In older releases, these exceptions were located in the
219
- `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
220
- exception class, defined in the `google-gax` gem. However, these classes were
221
- different from the standard exceptions (subclasses of `Google::Cloud::Error`)
222
- thrown by other client libraries such as `google-cloud-storage`.
223
-
224
- The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
225
- for consistency across all the Google Cloud client libraries. In general, these
226
- exceptions have the same name as their counterparts from older releases, but
227
- are located in the `Google::Cloud` namespace rather than the `Google::Gax`
228
- namespace.
229
-
230
- Old:
231
- ```
232
- client = Google::Cloud::TextToSpeech.new
233
-
234
- input = { text: "Hello, world!" }
235
- voice = { language_code: "en-US" }
236
- audio = { audio_encoding: Google::Cloud::Texttospeech::V1::AudioEncoding::MP3 }
237
-
238
- begin
239
- response = client.synthesize_speech input, voice, audio
240
- rescue Google::Gax::Error => e
241
- # Handle exceptions that subclass Google::Gax::Error
242
- end
243
- ```
244
-
245
- New:
246
- ```
247
- client = Google::Cloud::TextToSpeech.text_to_speech
248
-
249
- input = { text: "Hello, world!" }
250
- voice = { language_code: "en-US" }
251
- audio = { audio_encoding: Google::Cloud::TextToSpeech::V1::AudioEncoding::MP3 }
252
-
253
- begin
254
- response = client.synthesize_speech input: input, voice: voice,
255
- audio_config: audio
256
- rescue Google::Cloud::Error => e
257
- # Handle exceptions that subclass Google::Cloud::Error
258
- end
259
- ```
260
-
261
- ### Class Namespaces
262
-
263
- In older releases, some data type (protobuf) classes were located under the module
264
- `Google::Cloud::Texttospeech`. In the 1.0 release, these classes have been moved into the
265
- same `Google::Cloud::TextToSpeech` module by the client object, for consistency.
266
-
267
- In older releases, the client object was of class
268
- `Google::Cloud::TextToSpeech::V1::TextToSpeechClient`.
269
- In the 1.0 release, the client object is of class
270
- `Google::Cloud::TextToSpeech::V1::TextToSpeech::Client`.
271
- Note that most users will use the `Google::Cloud::TextToSpeech.text_to_speech`
272
- factory method to create instances of the client object, so you may not need to
273
- reference the actual class directly.
274
- See [Creating Clients](#creating-clients).
275
-
276
- In older releases, the credentials object was of class
277
- `Google::Cloud::TextToSpeech::V1::Credentials`.
278
- In the 1.0 release, the credentials object is of class
279
- `Google::Cloud::TextToSpeech::V1::TextToSpeech::Credentials`.
280
- Again, most users will not need to reference this class directly.
281
- See [Client Configuration](#client-configuration).