Skip to content

Commit d6990fb

Browse files
feat: Automated regeneration of TextToSpeech client (googleapis#12325)
Auto-created at 2024-10-15 13:13:17 +0000 using the toys pull request generator.
1 parent 4013414 commit d6990fb

18 files changed

+6
-632
lines changed

clients/text_to_speech/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_text_to_speech, "~> 0.18"}]
14+
[{:google_api_text_to_speech, "~> 0.19"}]
1515
end
1616
```
1717

clients/text_to_speech/lib/google_api/text_to_speech/v1/api/voices.ex

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -25,71 +25,6 @@ defmodule GoogleApi.TextToSpeech.V1.Api.Voices do
2525

2626
@library_version Mix.Project.config() |> Keyword.get(:version, "")
2727

28-
@doc """
29-
Generates voice clone key given a short voice prompt. This method validates the voice prompts with a series of checks against the voice talent statement to verify the voice clone is safe to generate.
30-
31-
## Parameters
32-
33-
* `connection` (*type:* `GoogleApi.TextToSpeech.V1.Connection.t`) - Connection to server
34-
* `optional_params` (*type:* `keyword()`) - Optional parameters
35-
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
36-
* `:access_token` (*type:* `String.t`) - OAuth access token.
37-
* `:alt` (*type:* `String.t`) - Data format for response.
38-
* `:callback` (*type:* `String.t`) - JSONP
39-
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
40-
* `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
41-
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
42-
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
43-
* `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
44-
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
45-
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
46-
* `:body` (*type:* `GoogleApi.TextToSpeech.V1.Model.GenerateVoiceCloningKeyRequest.t`) -
47-
* `opts` (*type:* `keyword()`) - Call options
48-
49-
## Returns
50-
51-
* `{:ok, %GoogleApi.TextToSpeech.V1.Model.GenerateVoiceCloningKeyResponse{}}` on success
52-
* `{:error, info}` on failure
53-
"""
54-
@spec texttospeech_voices_generate_voice_cloning_key(Tesla.Env.client(), keyword(), keyword()) ::
55-
{:ok, GoogleApi.TextToSpeech.V1.Model.GenerateVoiceCloningKeyResponse.t()}
56-
| {:ok, Tesla.Env.t()}
57-
| {:ok, list()}
58-
| {:error, any()}
59-
def texttospeech_voices_generate_voice_cloning_key(
60-
connection,
61-
optional_params \\ [],
62-
opts \\ []
63-
) do
64-
optional_params_config = %{
65-
:"$.xgafv" => :query,
66-
:access_token => :query,
67-
:alt => :query,
68-
:callback => :query,
69-
:fields => :query,
70-
:key => :query,
71-
:oauth_token => :query,
72-
:prettyPrint => :query,
73-
:quotaUser => :query,
74-
:uploadType => :query,
75-
:upload_protocol => :query,
76-
:body => :body
77-
}
78-
79-
request =
80-
Request.new()
81-
|> Request.method(:post)
82-
|> Request.url("/v1/voices:generateVoiceCloningKey", %{})
83-
|> Request.add_optional_params(optional_params_config, optional_params)
84-
|> Request.library_version(@library_version)
85-
86-
connection
87-
|> Connection.execute(request)
88-
|> Response.decode(
89-
opts ++ [struct: %GoogleApi.TextToSpeech.V1.Model.GenerateVoiceCloningKeyResponse{}]
90-
)
91-
end
92-
9328
@doc """
9429
Returns a list of Voice supported for synthesis.
9530

clients/text_to_speech/lib/google_api/text_to_speech/v1/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.TextToSpeech.V1 do
2020
API client metadata for GoogleApi.TextToSpeech.V1.
2121
"""
2222

23-
@discovery_revision "20241001"
23+
@discovery_revision "20241008"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

clients/text_to_speech/lib/google_api/text_to_speech/v1/model/generate_voice_cloning_key_request.ex

Lines changed: 0 additions & 55 deletions
This file was deleted.

clients/text_to_speech/lib/google_api/text_to_speech/v1/model/generate_voice_cloning_key_response.ex

Lines changed: 0 additions & 46 deletions
This file was deleted.

clients/text_to_speech/lib/google_api/text_to_speech/v1/model/input_audio.ex

Lines changed: 0 additions & 49 deletions
This file was deleted.

clients/text_to_speech/lib/google_api/text_to_speech/v1/model/input_audio_config.ex

Lines changed: 0 additions & 49 deletions
This file was deleted.

clients/text_to_speech/lib/google_api/text_to_speech/v1/model/voice_clone_params.ex

Lines changed: 0 additions & 46 deletions
This file was deleted.

clients/text_to_speech/lib/google_api/text_to_speech/v1/model/voice_selection_params.ex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ defmodule GoogleApi.TextToSpeech.V1.Model.VoiceSelectionParams do
2525
* `languageCode` (*type:* `String.t`, *default:* `nil`) - Required. The language (and potentially also the region) of the voice expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. "en-US". This should not include a script tag (e.g. use "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn't a Canadian voice available), or even a different language, e.g. using "nb" (Norwegian Bokmal) instead of "no" (Norwegian)".
2626
* `name` (*type:* `String.t`, *default:* `nil`) - The name of the voice. If both the name and the gender are not set, the service will choose a voice based on the other parameters such as language_code.
2727
* `ssmlGender` (*type:* `String.t`, *default:* `nil`) - The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement; if a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
28-
* `voiceClone` (*type:* `GoogleApi.TextToSpeech.V1.Model.VoiceCloneParams.t`, *default:* `nil`) - Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service will choose the voice clone matching the specified configuration.
2928
"""
3029

3130
use GoogleApi.Gax.ModelBase
@@ -34,15 +33,13 @@ defmodule GoogleApi.TextToSpeech.V1.Model.VoiceSelectionParams do
3433
:customVoice => GoogleApi.TextToSpeech.V1.Model.CustomVoiceParams.t() | nil,
3534
:languageCode => String.t() | nil,
3635
:name => String.t() | nil,
37-
:ssmlGender => String.t() | nil,
38-
:voiceClone => GoogleApi.TextToSpeech.V1.Model.VoiceCloneParams.t() | nil
36+
:ssmlGender => String.t() | nil
3937
}
4038

4139
field(:customVoice, as: GoogleApi.TextToSpeech.V1.Model.CustomVoiceParams)
4240
field(:languageCode)
4341
field(:name)
4442
field(:ssmlGender)
45-
field(:voiceClone, as: GoogleApi.TextToSpeech.V1.Model.VoiceCloneParams)
4643
end
4744

4845
defimpl Poison.Decoder, for: GoogleApi.TextToSpeech.V1.Model.VoiceSelectionParams do

0 commit comments

Comments
 (0)