google-cloud-text_to_speech 1.7.0 → 1.8.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: afb4b91c44bcbee7b7f1ee83a530f4ae7a8f96ebf2805db1597cd711251cc4e2
4
- data.tar.gz: e8edd129b9c7f344ccea73cf8db2609abafb7b56bfe5d6d860ee22f2daf3a7a9
3
+ metadata.gz: 3859515c7082d2e991df7e57747f206d83ba45bdcdc2d11e393dac63ec2a783d
4
+ data.tar.gz: 8e7cbf25e6bd8b4d6ed578e4a1406ab73df7c8155f4dea708a1b7985dca831ad
5
5
  SHA512:
6
- metadata.gz: 8f6b342609b280e84b17a4b40fa928357a3922fec7b3dd2b0a60d80125a73dba1085e6fcaab5dbdc774be2f1968cb29d5e6678a7be3e7c80ef656f3a761ba09d
7
- data.tar.gz: ab73688b7ddf9ad0cb7263621e5f8da81f1f43cbd2963514104e6f7698545c185bdc1f2075f038d40619b99349504a2f43377ea527b8a9b56b7f74a5a26395b6
6
+ metadata.gz: 1a15675ab9ddda2a30973b6030204c37a17a2ec2dfd3538138dc2596385a8752672bb52bee54be85e60c3d4613ebb4e22d163678ace102d2daa6fad2b50759c0
7
+ data.tar.gz: ebe42c42dc4240ed8bd78a749f202784171f12c3ae88ce3aa51fa1f3818d1abb3ff7d5950a5a5baa7b680c6e4d84c4717f15b3e8080298f9f335006dcae3396c
data/README.md CHANGED
@@ -43,9 +43,40 @@ and includes substantial interface changes. Existing code written for earlier
43
43
  versions of this library will likely require updates to use this version.
44
44
  See the {file:MIGRATING.md MIGRATING.md} document for more information.
45
45
 
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ Debug logging also requires that the versioned clients for this service be
72
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
73
+ 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).
76
+
46
77
  ## Supported Ruby Versions
47
78
 
48
- This library is supported on Ruby 2.7+.
79
+ This library is supported on Ruby 3.0+.
49
80
 
50
81
  Google provides official support for Ruby versions that are actively supported
51
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module TextToSpeech
23
- VERSION = "1.7.0"
23
+ VERSION = "1.8.0"
24
24
  end
25
25
  end
26
26
  end
@@ -58,6 +58,11 @@ module Google
58
58
  # You can also specify a different transport by passing `:rest` or `:grpc` in
59
59
  # the `transport` parameter.
60
60
  #
61
+ # Raises an exception if the currently installed versioned client gem for the
62
+ # given API version does not support the given transport of the TextToSpeech service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::TextToSpeech.text_to_speech_available?}.
65
+ #
61
66
  # ## About TextToSpeech
62
67
  #
63
68
  # Service that implements Google Cloud Text-to-Speech API.
@@ -79,6 +84,37 @@ module Google
79
84
  service_module.const_get(:Client).new(&block)
80
85
  end
81
86
 
87
+ ##
88
+ # Determines whether the TextToSpeech service is supported by the current client.
89
+ # If true, you can retrieve a client object by calling {Google::Cloud::TextToSpeech.text_to_speech}.
90
+ # If false, that method will raise an exception. This could happen if the given
91
+ # API version does not exist or does not support the TextToSpeech service,
92
+ # or if the versioned client gem needs an update to support the TextToSpeech service.
93
+ #
94
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
95
+ # Defaults to `:v1`.
96
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
97
+ # @return [boolean] Whether the service is available.
98
+ #
99
+ def self.text_to_speech_available? version: :v1, transport: :grpc
100
+ require "google/cloud/text_to_speech/#{version.to_s.downcase}"
101
+ package_name = Google::Cloud::TextToSpeech
102
+ .constants
103
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
104
+ .first
105
+ return false unless package_name
106
+ service_module = Google::Cloud::TextToSpeech.const_get package_name
107
+ return false unless service_module.const_defined? :TextToSpeech
108
+ service_module = service_module.const_get :TextToSpeech
109
+ if transport == :rest
110
+ return false unless service_module.const_defined? :Rest
111
+ service_module = service_module.const_get :Rest
112
+ end
113
+ service_module.const_defined? :Client
114
+ rescue ::LoadError
115
+ false
116
+ end
117
+
82
118
  ##
83
119
  # Create a new client object for TextToSpeechLongAudioSynthesize.
84
120
  #
@@ -92,6 +128,11 @@ module Google
92
128
  # You can also specify a different transport by passing `:rest` or `:grpc` in
93
129
  # the `transport` parameter.
94
130
  #
131
+ # Raises an exception if the currently installed versioned client gem for the
132
+ # given API version does not support the given transport of the TextToSpeechLongAudioSynthesize service.
133
+ # You can determine whether the method will succeed by calling
134
+ # {Google::Cloud::TextToSpeech.text_to_speech_long_audio_synthesize_available?}.
135
+ #
95
136
  # ## About TextToSpeechLongAudioSynthesize
96
137
  #
97
138
  # Service that implements Google Cloud Text-to-Speech API.
@@ -113,6 +154,37 @@ module Google
113
154
  service_module.const_get(:Client).new(&block)
114
155
  end
115
156
 
157
+ ##
158
+ # Determines whether the TextToSpeechLongAudioSynthesize service is supported by the current client.
159
+ # If true, you can retrieve a client object by calling {Google::Cloud::TextToSpeech.text_to_speech_long_audio_synthesize}.
160
+ # If false, that method will raise an exception. This could happen if the given
161
+ # API version does not exist or does not support the TextToSpeechLongAudioSynthesize service,
162
+ # or if the versioned client gem needs an update to support the TextToSpeechLongAudioSynthesize service.
163
+ #
164
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
165
+ # Defaults to `:v1`.
166
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
167
+ # @return [boolean] Whether the service is available.
168
+ #
169
+ def self.text_to_speech_long_audio_synthesize_available? version: :v1, transport: :grpc
170
+ require "google/cloud/text_to_speech/#{version.to_s.downcase}"
171
+ package_name = Google::Cloud::TextToSpeech
172
+ .constants
173
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
174
+ .first
175
+ return false unless package_name
176
+ service_module = Google::Cloud::TextToSpeech.const_get package_name
177
+ return false unless service_module.const_defined? :TextToSpeechLongAudioSynthesize
178
+ service_module = service_module.const_get :TextToSpeechLongAudioSynthesize
179
+ if transport == :rest
180
+ return false unless service_module.const_defined? :Rest
181
+ service_module = service_module.const_get :Rest
182
+ end
183
+ service_module.const_defined? :Client
184
+ rescue ::LoadError
185
+ false
186
+ end
187
+
116
188
  ##
117
189
  # Configure the google-cloud-text_to_speech library.
118
190
  #
metadata CHANGED
@@ -1,14 +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.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-02-26 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -83,7 +82,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
83
82
  licenses:
84
83
  - Apache-2.0
85
84
  metadata: {}
86
- post_install_message:
87
85
  rdoc_options: []
88
86
  require_paths:
89
87
  - lib
@@ -91,15 +89,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
89
  requirements:
92
90
  - - ">="
93
91
  - !ruby/object:Gem::Version
94
- version: '2.7'
92
+ version: '3.0'
95
93
  required_rubygems_version: !ruby/object:Gem::Requirement
96
94
  requirements:
97
95
  - - ">="
98
96
  - !ruby/object:Gem::Version
99
97
  version: '0'
100
98
  requirements: []
101
- rubygems_version: 3.5.6
102
- signing_key:
99
+ rubygems_version: 3.6.2
103
100
  specification_version: 4
104
101
  summary: API Client library for the Cloud Text-to-Speech API
105
102
  test_files: []