Skip to content

Commit 2d71e2c

Browse files
feat: Automated regeneration of texttospeech v1 client (googleapis#20411)
Auto-created at 2024-10-20 09:23:06 +0000 using the toys pull request generator.
1 parent 0f253d6 commit 2d71e2c

File tree

5 files changed

+6
-250
lines changed

5 files changed

+6
-250
lines changed

generated/google-apis-texttospeech_v1/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release history for google-apis-texttospeech_v1
22

3+
### v0.33.0 (2024-10-20)
4+
5+
* Regenerated from discovery document revision 20241008
6+
37
### v0.32.0 (2024-10-06)
48

59
* Regenerated from discovery document revision 20241001

generated/google-apis-texttospeech_v1/lib/google/apis/texttospeech_v1/classes.rb

Lines changed: 0 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -221,68 +221,6 @@ def update!(**args)
221221
end
222222
end
223223

224-
# Request message for the `GenerateVoiceCloningKey` method.
225-
class GenerateVoiceCloningKeyRequest
226-
include Google::Apis::Core::Hashable
227-
228-
# Required. The script used for the voice talent statement. The script will be
229-
# provided to the caller through other channels. It must be returned unchanged
230-
# in this field.
231-
# Corresponds to the JSON property `consentScript`
232-
# @return [String]
233-
attr_accessor :consent_script
234-
235-
# Required. The language of the supplied audio as a [BCP-47](https://www.rfc-
236-
# editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US". See [Language
237-
# Support](https://cloud.google.com/speech-to-text/docs/languages) for a list of
238-
# the currently supported language codes.
239-
# Corresponds to the JSON property `languageCode`
240-
# @return [String]
241-
attr_accessor :language_code
242-
243-
# Holds audio content and config.
244-
# Corresponds to the JSON property `referenceAudio`
245-
# @return [Google::Apis::TexttospeechV1::InputAudio]
246-
attr_accessor :reference_audio
247-
248-
# Holds audio content and config.
249-
# Corresponds to the JSON property `voiceTalentConsent`
250-
# @return [Google::Apis::TexttospeechV1::InputAudio]
251-
attr_accessor :voice_talent_consent
252-
253-
def initialize(**args)
254-
update!(**args)
255-
end
256-
257-
# Update properties of this object
258-
def update!(**args)
259-
@consent_script = args[:consent_script] if args.key?(:consent_script)
260-
@language_code = args[:language_code] if args.key?(:language_code)
261-
@reference_audio = args[:reference_audio] if args.key?(:reference_audio)
262-
@voice_talent_consent = args[:voice_talent_consent] if args.key?(:voice_talent_consent)
263-
end
264-
end
265-
266-
# Response message for the `GenerateVoiceCloningKey` method.
267-
class GenerateVoiceCloningKeyResponse
268-
include Google::Apis::Core::Hashable
269-
270-
# The voice clone key. Use it in the SynthesizeSpeechRequest by setting [voice.
271-
# voice_clone.voice_cloning_key].
272-
# Corresponds to the JSON property `voiceCloningKey`
273-
# @return [String]
274-
attr_accessor :voice_cloning_key
275-
276-
def initialize(**args)
277-
update!(**args)
278-
end
279-
280-
# Update properties of this object
281-
def update!(**args)
282-
@voice_cloning_key = args[:voice_cloning_key] if args.key?(:voice_cloning_key)
283-
end
284-
end
285-
286224
# Metadata for response returned by the `SynthesizeLongAudio` method.
287225
class GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata
288226
include Google::Apis::Core::Hashable
@@ -314,60 +252,6 @@ def update!(**args)
314252
end
315253
end
316254

317-
# Holds audio content and config.
318-
class InputAudio
319-
include Google::Apis::Core::Hashable
320-
321-
# Description of inputted audio data.
322-
# Corresponds to the JSON property `audioConfig`
323-
# @return [Google::Apis::TexttospeechV1::InputAudioConfig]
324-
attr_accessor :audio_config
325-
326-
# Required. The audio data bytes encoded as specified in `InputAudioConfig`.
327-
# Note: as with all bytes fields, proto buffers use a pure binary representation,
328-
# whereas JSON representations use base64. Audio samples should be between 5-25
329-
# seconds in length.
330-
# Corresponds to the JSON property `content`
331-
# NOTE: Values are automatically base64 encoded/decoded in the client library.
332-
# @return [String]
333-
attr_accessor :content
334-
335-
def initialize(**args)
336-
update!(**args)
337-
end
338-
339-
# Update properties of this object
340-
def update!(**args)
341-
@audio_config = args[:audio_config] if args.key?(:audio_config)
342-
@content = args[:content] if args.key?(:content)
343-
end
344-
end
345-
346-
# Description of inputted audio data.
347-
class InputAudioConfig
348-
include Google::Apis::Core::Hashable
349-
350-
# Required. The format of the audio byte stream.
351-
# Corresponds to the JSON property `audioEncoding`
352-
# @return [String]
353-
attr_accessor :audio_encoding
354-
355-
# Required. The sample rate (in hertz) for this audio.
356-
# Corresponds to the JSON property `sampleRateHertz`
357-
# @return [Fixnum]
358-
attr_accessor :sample_rate_hertz
359-
360-
def initialize(**args)
361-
update!(**args)
362-
end
363-
364-
# Update properties of this object
365-
def update!(**args)
366-
@audio_encoding = args[:audio_encoding] if args.key?(:audio_encoding)
367-
@sample_rate_hertz = args[:sample_rate_hertz] if args.key?(:sample_rate_hertz)
368-
end
369-
end
370-
371255
# The response message for Operations.ListOperations.
372256
class ListOperationsResponse
373257
include Google::Apis::Core::Hashable
@@ -722,25 +606,6 @@ def update!(**args)
722606
end
723607
end
724608

725-
# The configuration of Voice Clone feature.
726-
class VoiceCloneParams
727-
include Google::Apis::Core::Hashable
728-
729-
# Required. Created by GenerateVoiceCloningKey.
730-
# Corresponds to the JSON property `voiceCloningKey`
731-
# @return [String]
732-
attr_accessor :voice_cloning_key
733-
734-
def initialize(**args)
735-
update!(**args)
736-
end
737-
738-
# Update properties of this object
739-
def update!(**args)
740-
@voice_cloning_key = args[:voice_cloning_key] if args.key?(:voice_cloning_key)
741-
end
742-
end
743-
744609
# Description of which voice to use for a synthesis request.
745610
class VoiceSelectionParams
746611
include Google::Apis::Core::Hashable
@@ -780,11 +645,6 @@ class VoiceSelectionParams
780645
# @return [String]
781646
attr_accessor :ssml_gender
782647

783-
# The configuration of Voice Clone feature.
784-
# Corresponds to the JSON property `voiceClone`
785-
# @return [Google::Apis::TexttospeechV1::VoiceCloneParams]
786-
attr_accessor :voice_clone
787-
788648
def initialize(**args)
789649
update!(**args)
790650
end
@@ -795,7 +655,6 @@ def update!(**args)
795655
@language_code = args[:language_code] if args.key?(:language_code)
796656
@name = args[:name] if args.key?(:name)
797657
@ssml_gender = args[:ssml_gender] if args.key?(:ssml_gender)
798-
@voice_clone = args[:voice_clone] if args.key?(:voice_clone)
799658
end
800659
end
801660
end

generated/google-apis-texttospeech_v1/lib/google/apis/texttospeech_v1/gem_version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ module Google
1616
module Apis
1717
module TexttospeechV1
1818
# Version of the google-apis-texttospeech_v1 gem
19-
GEM_VERSION = "0.32.0"
19+
GEM_VERSION = "0.33.0"
2020

2121
# Version of the code generator used to generate this client
2222
GENERATOR_VERSION = "0.15.1"
2323

2424
# Revision of the discovery document this client was generated from
25-
REVISION = "20241001"
25+
REVISION = "20241008"
2626
end
2727
end
2828
end

generated/google-apis-texttospeech_v1/lib/google/apis/texttospeech_v1/representations.rb

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -64,36 +64,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
6464
include Google::Apis::Core::JsonObjectSupport
6565
end
6666

67-
class GenerateVoiceCloningKeyRequest
68-
class Representation < Google::Apis::Core::JsonRepresentation; end
69-
70-
include Google::Apis::Core::JsonObjectSupport
71-
end
72-
73-
class GenerateVoiceCloningKeyResponse
74-
class Representation < Google::Apis::Core::JsonRepresentation; end
75-
76-
include Google::Apis::Core::JsonObjectSupport
77-
end
78-
7967
class GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata
8068
class Representation < Google::Apis::Core::JsonRepresentation; end
8169

8270
include Google::Apis::Core::JsonObjectSupport
8371
end
8472

85-
class InputAudio
86-
class Representation < Google::Apis::Core::JsonRepresentation; end
87-
88-
include Google::Apis::Core::JsonObjectSupport
89-
end
90-
91-
class InputAudioConfig
92-
class Representation < Google::Apis::Core::JsonRepresentation; end
93-
94-
include Google::Apis::Core::JsonObjectSupport
95-
end
96-
9773
class ListOperationsResponse
9874
class Representation < Google::Apis::Core::JsonRepresentation; end
9975

@@ -154,12 +130,6 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
154130
include Google::Apis::Core::JsonObjectSupport
155131
end
156132

157-
class VoiceCloneParams
158-
class Representation < Google::Apis::Core::JsonRepresentation; end
159-
160-
include Google::Apis::Core::JsonObjectSupport
161-
end
162-
163133
class VoiceSelectionParams
164134
class Representation < Google::Apis::Core::JsonRepresentation; end
165135

@@ -222,25 +192,6 @@ class Representation < Google::Apis::Core::JsonRepresentation
222192
end
223193
end
224194

225-
class GenerateVoiceCloningKeyRequest
226-
# @private
227-
class Representation < Google::Apis::Core::JsonRepresentation
228-
property :consent_script, as: 'consentScript'
229-
property :language_code, as: 'languageCode'
230-
property :reference_audio, as: 'referenceAudio', class: Google::Apis::TexttospeechV1::InputAudio, decorator: Google::Apis::TexttospeechV1::InputAudio::Representation
231-
232-
property :voice_talent_consent, as: 'voiceTalentConsent', class: Google::Apis::TexttospeechV1::InputAudio, decorator: Google::Apis::TexttospeechV1::InputAudio::Representation
233-
234-
end
235-
end
236-
237-
class GenerateVoiceCloningKeyResponse
238-
# @private
239-
class Representation < Google::Apis::Core::JsonRepresentation
240-
property :voice_cloning_key, as: 'voiceCloningKey'
241-
end
242-
end
243-
244195
class GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata
245196
# @private
246197
class Representation < Google::Apis::Core::JsonRepresentation
@@ -250,23 +201,6 @@ class Representation < Google::Apis::Core::JsonRepresentation
250201
end
251202
end
252203

253-
class InputAudio
254-
# @private
255-
class Representation < Google::Apis::Core::JsonRepresentation
256-
property :audio_config, as: 'audioConfig', class: Google::Apis::TexttospeechV1::InputAudioConfig, decorator: Google::Apis::TexttospeechV1::InputAudioConfig::Representation
257-
258-
property :content, :base64 => true, as: 'content'
259-
end
260-
end
261-
262-
class InputAudioConfig
263-
# @private
264-
class Representation < Google::Apis::Core::JsonRepresentation
265-
property :audio_encoding, as: 'audioEncoding'
266-
property :sample_rate_hertz, as: 'sampleRateHertz'
267-
end
268-
end
269-
270204
class ListOperationsResponse
271205
# @private
272206
class Representation < Google::Apis::Core::JsonRepresentation
@@ -368,13 +302,6 @@ class Representation < Google::Apis::Core::JsonRepresentation
368302
end
369303
end
370304

371-
class VoiceCloneParams
372-
# @private
373-
class Representation < Google::Apis::Core::JsonRepresentation
374-
property :voice_cloning_key, as: 'voiceCloningKey'
375-
end
376-
end
377-
378305
class VoiceSelectionParams
379306
# @private
380307
class Representation < Google::Apis::Core::JsonRepresentation
@@ -383,8 +310,6 @@ class Representation < Google::Apis::Core::JsonRepresentation
383310
property :language_code, as: 'languageCode'
384311
property :name, as: 'name'
385312
property :ssml_gender, as: 'ssmlGender'
386-
property :voice_clone, as: 'voiceClone', class: Google::Apis::TexttospeechV1::VoiceCloneParams, decorator: Google::Apis::TexttospeechV1::VoiceCloneParams::Representation
387-
388313
end
389314
end
390315
end

generated/google-apis-texttospeech_v1/lib/google/apis/texttospeech_v1/service.rb

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -259,38 +259,6 @@ def synthesize_text_speech(synthesize_speech_request_object = nil, fields: nil,
259259
execute_or_queue_command(command, &block)
260260
end
261261

262-
# Generates voice clone key given a short voice prompt. This method validates
263-
# the voice prompts with a series of checks against the voice talent statement
264-
# to verify the voice clone is safe to generate.
265-
# @param [Google::Apis::TexttospeechV1::GenerateVoiceCloningKeyRequest] generate_voice_cloning_key_request_object
266-
# @param [String] fields
267-
# Selector specifying which fields to include in a partial response.
268-
# @param [String] quota_user
269-
# Available to use for quota purposes for server-side applications. Can be any
270-
# arbitrary string assigned to a user, but should not exceed 40 characters.
271-
# @param [Google::Apis::RequestOptions] options
272-
# Request-specific options
273-
#
274-
# @yield [result, err] Result & error if block supplied
275-
# @yieldparam result [Google::Apis::TexttospeechV1::GenerateVoiceCloningKeyResponse] parsed result object
276-
# @yieldparam err [StandardError] error object if request failed
277-
#
278-
# @return [Google::Apis::TexttospeechV1::GenerateVoiceCloningKeyResponse]
279-
#
280-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
281-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
282-
# @raise [Google::Apis::AuthorizationError] Authorization is required
283-
def generate_voice_cloning_key(generate_voice_cloning_key_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
284-
command = make_simple_command(:post, 'v1/voices:generateVoiceCloningKey', options)
285-
command.request_representation = Google::Apis::TexttospeechV1::GenerateVoiceCloningKeyRequest::Representation
286-
command.request_object = generate_voice_cloning_key_request_object
287-
command.response_representation = Google::Apis::TexttospeechV1::GenerateVoiceCloningKeyResponse::Representation
288-
command.response_class = Google::Apis::TexttospeechV1::GenerateVoiceCloningKeyResponse
289-
command.query['fields'] = fields unless fields.nil?
290-
command.query['quotaUser'] = quota_user unless quota_user.nil?
291-
execute_or_queue_command(command, &block)
292-
end
293-
294262
# Returns a list of Voice supported for synthesis.
295263
# @param [String] language_code
296264
# Optional. Recommended. [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)

0 commit comments

Comments
 (0)