telnyx 5.71.0 → 5.72.1
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 +4 -4
- data/CHANGELOG.md +22 -0
- data/README.md +1 -1
- data/lib/telnyx/lib/webhook_verification.rb +14 -1
- data/lib/telnyx/lib/webhooks_ed25519.rb +51 -38
- data/lib/telnyx/lib.rb +14 -0
- data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +3 -382
- data/lib/telnyx/resources/voice_clones.rb +1 -5
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +4 -0
- data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +4 -744
- data/rbi/telnyx/resources/voice_clones.rbi +2 -12
- data/sig/telnyx/models/voice_clone_create_from_upload_params.rbs +4 -285
- data/sig/telnyx/resources/voice_clones.rbs +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2de57d095a499f65deaa5ff6f238906900c1766a326406dde046422b6691fb5f
|
|
4
|
+
data.tar.gz: 550620f1f61305b5119584f3e60d16c6c18c526a4c3c191f0501f612074b6e69
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 85ac4fafc5e4458591fcad7fde672442fe5911599c77340be6e76132ea6b5e19961910e5c8cb1cd85c606d41a2c685aa761c0367115005a268629eff54272121
|
|
7
|
+
data.tar.gz: 1e279b0daca717647d517581733faa38c1a57d351b3d8949ca16413f2b5c66a8f5857846e12f4d62932b682a5d568a7714c3bcf6d89409fc2d2d48a4e5d80c4a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.72.1 (2026-04-12)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v5.72.0...v5.72.1](https://github.com/team-telnyx/telnyx-ruby/compare/v5.72.0...v5.72.1)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* set additionalProperties=false on VoiceCloneUploadRequest to prevent codegen errors ([fed6f0b](https://github.com/team-telnyx/telnyx-ruby/commit/fed6f0b5d6d256f56f8a87c37e5058bdc7ebdc81))
|
|
10
|
+
|
|
11
|
+
## 5.72.0 (2026-04-11)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v5.71.0...v5.72.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.71.0...v5.72.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **lib:** make ED25519 the default webhook verification ([c281219](https://github.com/team-telnyx/telnyx-ruby/commit/c2812192677e731ddf6b6702590f7e55d2f3ef68))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **lib:** move ED25519 auto-require to lib.rb entry point to survive codegen ([7f38f2c](https://github.com/team-telnyx/telnyx-ruby/commit/7f38f2cf33fb3c8391ce7d8f86c88513d7edc907))
|
|
23
|
+
* **lib:** update webhook tests for ED25519 default unwrap ([30ac4c7](https://github.com/team-telnyx/telnyx-ruby/commit/30ac4c7d1fc66732ba5dc55824d3876b4dd120f0))
|
|
24
|
+
|
|
3
25
|
## 5.71.0 (2026-04-11)
|
|
4
26
|
|
|
5
27
|
Full Changelog: [v5.70.0...v5.71.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.70.0...v5.71.0)
|
data/README.md
CHANGED
|
@@ -150,7 +150,20 @@ module Telnyx
|
|
|
150
150
|
# The raw 32-byte key needs to be wrapped in X.509 SubjectPublicKeyInfo format
|
|
151
151
|
# ED25519 OID: 1.3.101.112 = 06 03 2b 65 70
|
|
152
152
|
# X.509 SPKI header for ED25519: 30 2a 30 05 06 03 2b 65 70 03 21 00
|
|
153
|
-
ed25519_spki_header = [
|
|
153
|
+
ed25519_spki_header = [
|
|
154
|
+
0x30,
|
|
155
|
+
0x2a,
|
|
156
|
+
0x30,
|
|
157
|
+
0x05,
|
|
158
|
+
0x06,
|
|
159
|
+
0x03,
|
|
160
|
+
0x2b,
|
|
161
|
+
0x65,
|
|
162
|
+
0x70,
|
|
163
|
+
0x03,
|
|
164
|
+
0x21,
|
|
165
|
+
0x00
|
|
166
|
+
].pack("C*")
|
|
154
167
|
der_key = ed25519_spki_header + public_key_bytes
|
|
155
168
|
|
|
156
169
|
begin
|
|
@@ -3,48 +3,61 @@
|
|
|
3
3
|
require_relative "webhook_verification"
|
|
4
4
|
require_relative "webhook_verification_error"
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
# )
|
|
22
|
-
#
|
|
23
|
-
# # Verify signature only (raises WebhookVerificationError on failure)
|
|
24
|
-
# client.webhooks.verify!(payload, headers)
|
|
25
|
-
#
|
|
26
|
-
# # Verify and parse (ED25519 verification, then parse)
|
|
27
|
-
# event = client.webhooks.unwrap(payload, headers: headers)
|
|
28
|
-
#
|
|
29
|
-
class Webhooks
|
|
30
|
-
include Telnyx::Lib::WebhookVerification
|
|
31
|
-
|
|
32
|
-
# Override unwrap to use ED25519 verification instead of StandardWebhooks.
|
|
6
|
+
# Only apply the ED25519 override if the generated Webhooks class exists.
|
|
7
|
+
# This file is loaded after lib/telnyx/resources/webhooks.rb in the gem
|
|
8
|
+
# load order (see lib/telnyx.rb), so the class should always be defined.
|
|
9
|
+
if defined?(Telnyx::Resources::Webhooks)
|
|
10
|
+
module Telnyx
|
|
11
|
+
module Resources
|
|
12
|
+
# Extends the generated Webhooks class with ED25519 signature verification.
|
|
13
|
+
#
|
|
14
|
+
# This reopens the Webhooks class to include the WebhookVerification module,
|
|
15
|
+
# which adds ED25519 signature verification matching Python, Node, Go, and Java SDKs.
|
|
16
|
+
#
|
|
17
|
+
# Usage:
|
|
18
|
+
#
|
|
19
|
+
# require "telnyx"
|
|
20
|
+
# # ED25519 verification is now loaded by default — no extra require needed
|
|
33
21
|
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
22
|
+
# client = Telnyx::Client.new(
|
|
23
|
+
# api_key: ENV["TELNYX_API_KEY"],
|
|
24
|
+
# public_key: ENV["TELNYX_PUBLIC_KEY"] # Base64 from Mission Control
|
|
25
|
+
# )
|
|
37
26
|
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
# # Verify signature only (raises WebhookVerificationError on failure)
|
|
28
|
+
# client.webhooks.verify!(payload, headers)
|
|
29
|
+
#
|
|
30
|
+
# # Verify and parse (ED25519 verification, then parse)
|
|
31
|
+
# event = client.webhooks.unwrap(payload, headers: headers)
|
|
32
|
+
#
|
|
33
|
+
class Webhooks
|
|
34
|
+
include Telnyx::Lib::WebhookVerification
|
|
35
|
+
|
|
36
|
+
# Override unwrap to use ED25519 verification instead of StandardWebhooks.
|
|
37
|
+
#
|
|
38
|
+
# @param payload [String] The raw webhook payload as a string
|
|
39
|
+
# @param headers [Hash{String=>String}] The raw HTTP headers
|
|
40
|
+
# @param key [String, nil] Optional public key override (base64-encoded ED25519)
|
|
41
|
+
#
|
|
42
|
+
# @return [Telnyx::Models::UnwrapWebhookEvent]
|
|
43
|
+
# @raise [Telnyx::Errors::WebhookVerificationError] If verification fails
|
|
44
|
+
def unwrap(payload, headers:, key: nil)
|
|
45
|
+
# Use ED25519 verification
|
|
46
|
+
do_verify_signature(payload, headers, key || @client.public_key)
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
# Parse the payload
|
|
49
|
+
parsed = JSON.parse(payload, symbolize_names: true)
|
|
50
|
+
Telnyx::Internal::Type::Converter.coerce(Telnyx::Models::UnwrapWebhookEvent, parsed)
|
|
51
|
+
end
|
|
47
52
|
end
|
|
48
53
|
end
|
|
49
54
|
end
|
|
55
|
+
else
|
|
56
|
+
# If the generated Webhooks class isn't loaded yet, the ED25519 override
|
|
57
|
+
# can't be applied. This shouldn't happen in normal gem usage since
|
|
58
|
+
# lib/telnyx.rb loads resources before lib/. If you see this warning,
|
|
59
|
+
# ensure lib/telnyx.rb requires lib/telnyx/lib after the resources.
|
|
60
|
+
warn "[telnyx] ED25519 webhook verification not loaded: " \
|
|
61
|
+
"Telnyx::Resources::Webhooks is not defined. " \
|
|
62
|
+
"Check that lib/telnyx.rb loads resources before lib/telnyx/lib."
|
|
50
63
|
end
|
data/lib/telnyx/lib.rb
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Custom lib entry point — preserved across Stainless codegen.
|
|
4
|
+
#
|
|
5
|
+
# This file requires all custom modules in lib/telnyx/lib/.
|
|
6
|
+
# It is loaded from lib/telnyx.rb (the gem entry point).
|
|
7
|
+
#
|
|
8
|
+
# If Stainless regenerates lib/telnyx.rb, the require_relative line
|
|
9
|
+
# pointing to this file must be re-added. All other custom code
|
|
10
|
+
# lives here and in lib/telnyx/lib/ — safe from codegen.
|
|
11
|
+
#
|
|
12
|
+
# Add new custom modules below:
|
|
13
|
+
|
|
14
|
+
require_relative "lib/webhooks_ed25519"
|
|
@@ -8,392 +8,13 @@ module Telnyx
|
|
|
8
8
|
include Telnyx::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute upload_params
|
|
11
|
-
# Multipart form data for creating a voice clone from a direct audio upload.
|
|
12
|
-
# Maximum file size: 5MB for Telnyx, 20MB for Minimax.
|
|
13
11
|
#
|
|
14
|
-
# @return [
|
|
15
|
-
required :upload_params,
|
|
12
|
+
# @return [Object]
|
|
13
|
+
required :upload_params, Telnyx::Internal::Type::Unknown
|
|
16
14
|
|
|
17
15
|
# @!method initialize(upload_params:, request_options: {})
|
|
18
|
-
#
|
|
19
|
-
# {Telnyx::Models::VoiceCloneCreateFromUploadParams} for more details.
|
|
20
|
-
#
|
|
21
|
-
# @param upload_params [Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone] Multipart form data for creating a voice clone from a direct audio upload. Maxim
|
|
22
|
-
#
|
|
16
|
+
# @param upload_params [Object]
|
|
23
17
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
-
|
|
25
|
-
# Multipart form data for creating a voice clone from a direct audio upload.
|
|
26
|
-
# Maximum file size: 5MB for Telnyx, 20MB for Minimax.
|
|
27
|
-
module UploadParams
|
|
28
|
-
extend Telnyx::Internal::Type::Union
|
|
29
|
-
|
|
30
|
-
# Upload-based voice clone using the Telnyx Qwen3TTS model (default).
|
|
31
|
-
variant -> { Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone }
|
|
32
|
-
|
|
33
|
-
# Upload-based voice clone using the Telnyx Ultra model.
|
|
34
|
-
variant -> { Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone }
|
|
35
|
-
|
|
36
|
-
# Upload-based voice clone using the Minimax provider.
|
|
37
|
-
variant -> { Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone }
|
|
38
|
-
|
|
39
|
-
class TelnyxQwen3TtsClone < Telnyx::Internal::Type::BaseModel
|
|
40
|
-
# @!attribute audio_file
|
|
41
|
-
# Audio file to clone the voice from. Supported formats: WAV, MP3, FLAC, OGG, M4A.
|
|
42
|
-
# For best quality, provide 5–10 seconds of clear, uninterrupted speech. Maximum
|
|
43
|
-
# size: 5MB.
|
|
44
|
-
#
|
|
45
|
-
# @return [Pathname, StringIO, IO, String, Telnyx::FilePart]
|
|
46
|
-
required :audio_file, Telnyx::Internal::Type::FileInput
|
|
47
|
-
|
|
48
|
-
# @!attribute gender
|
|
49
|
-
# Gender of the voice clone.
|
|
50
|
-
#
|
|
51
|
-
# @return [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone::Gender]
|
|
52
|
-
required :gender,
|
|
53
|
-
enum: -> { Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone::Gender }
|
|
54
|
-
|
|
55
|
-
# @!attribute language
|
|
56
|
-
# ISO 639-1 language code from the Qwen language set.
|
|
57
|
-
#
|
|
58
|
-
# @return [String]
|
|
59
|
-
required :language, String
|
|
60
|
-
|
|
61
|
-
# @!attribute name
|
|
62
|
-
# Name for the voice clone.
|
|
63
|
-
#
|
|
64
|
-
# @return [String]
|
|
65
|
-
required :name, String
|
|
66
|
-
|
|
67
|
-
# @!attribute provider
|
|
68
|
-
# Voice synthesis provider. Must be `telnyx`.
|
|
69
|
-
#
|
|
70
|
-
# @return [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone::Provider]
|
|
71
|
-
required :provider,
|
|
72
|
-
enum: -> { Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone::Provider }
|
|
73
|
-
|
|
74
|
-
# @!attribute label
|
|
75
|
-
# Optional custom label describing the voice style.
|
|
76
|
-
#
|
|
77
|
-
# @return [String, nil]
|
|
78
|
-
optional :label, String
|
|
79
|
-
|
|
80
|
-
# @!attribute model_id
|
|
81
|
-
# TTS model identifier. Nullable/omittable — defaults to Qwen3TTS.
|
|
82
|
-
#
|
|
83
|
-
# @return [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone::ModelID, nil]
|
|
84
|
-
optional :model_id,
|
|
85
|
-
enum: -> {
|
|
86
|
-
Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone::ModelID
|
|
87
|
-
},
|
|
88
|
-
nil?: true
|
|
89
|
-
|
|
90
|
-
# @!attribute ref_text
|
|
91
|
-
# Optional transcript of the audio file. Providing this improves clone quality.
|
|
92
|
-
#
|
|
93
|
-
# @return [String, nil]
|
|
94
|
-
optional :ref_text, String
|
|
95
|
-
|
|
96
|
-
# @!method initialize(audio_file:, gender:, language:, name:, provider:, label: nil, model_id: nil, ref_text: nil)
|
|
97
|
-
# Some parameter documentations has been truncated, see
|
|
98
|
-
# {Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone}
|
|
99
|
-
# for more details.
|
|
100
|
-
#
|
|
101
|
-
# Upload-based voice clone using the Telnyx Qwen3TTS model (default).
|
|
102
|
-
#
|
|
103
|
-
# @param audio_file [Pathname, StringIO, IO, String, Telnyx::FilePart] Audio file to clone the voice from. Supported formats: WAV, MP3, FLAC, OGG, M4A.
|
|
104
|
-
#
|
|
105
|
-
# @param gender [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone::Gender] Gender of the voice clone.
|
|
106
|
-
#
|
|
107
|
-
# @param language [String] ISO 639-1 language code from the Qwen language set.
|
|
108
|
-
#
|
|
109
|
-
# @param name [String] Name for the voice clone.
|
|
110
|
-
#
|
|
111
|
-
# @param provider [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone::Provider] Voice synthesis provider. Must be `telnyx`.
|
|
112
|
-
#
|
|
113
|
-
# @param label [String] Optional custom label describing the voice style.
|
|
114
|
-
#
|
|
115
|
-
# @param model_id [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone::ModelID, nil] TTS model identifier. Nullable/omittable — defaults to Qwen3TTS.
|
|
116
|
-
#
|
|
117
|
-
# @param ref_text [String] Optional transcript of the audio file. Providing this improves clone quality.
|
|
118
|
-
|
|
119
|
-
# Gender of the voice clone.
|
|
120
|
-
#
|
|
121
|
-
# @see Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone#gender
|
|
122
|
-
module Gender
|
|
123
|
-
extend Telnyx::Internal::Type::Enum
|
|
124
|
-
|
|
125
|
-
MALE = :male
|
|
126
|
-
FEMALE = :female
|
|
127
|
-
NEUTRAL = :neutral
|
|
128
|
-
|
|
129
|
-
# @!method self.values
|
|
130
|
-
# @return [Array<Symbol>]
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
# Voice synthesis provider. Must be `telnyx`.
|
|
134
|
-
#
|
|
135
|
-
# @see Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone#provider
|
|
136
|
-
module Provider
|
|
137
|
-
extend Telnyx::Internal::Type::Enum
|
|
138
|
-
|
|
139
|
-
TELNYX = :telnyx
|
|
140
|
-
MINIMAX = :minimax
|
|
141
|
-
|
|
142
|
-
# @!method self.values
|
|
143
|
-
# @return [Array<Symbol>]
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
# TTS model identifier. Nullable/omittable — defaults to Qwen3TTS.
|
|
147
|
-
#
|
|
148
|
-
# @see Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone#model_id
|
|
149
|
-
module ModelID
|
|
150
|
-
extend Telnyx::Internal::Type::Enum
|
|
151
|
-
|
|
152
|
-
QWEN3_TTS = :Qwen3TTS
|
|
153
|
-
|
|
154
|
-
# @!method self.values
|
|
155
|
-
# @return [Array<Symbol>]
|
|
156
|
-
end
|
|
157
|
-
end
|
|
158
|
-
|
|
159
|
-
class TelnyxUltraClone < Telnyx::Internal::Type::BaseModel
|
|
160
|
-
# @!attribute audio_file
|
|
161
|
-
# Audio file to clone the voice from. Supported formats: WAV, MP3, FLAC, OGG, M4A.
|
|
162
|
-
# For best quality, provide 5–10 seconds of clear, uninterrupted speech. Maximum
|
|
163
|
-
# size: 5MB.
|
|
164
|
-
#
|
|
165
|
-
# @return [Pathname, StringIO, IO, String, Telnyx::FilePart]
|
|
166
|
-
required :audio_file, Telnyx::Internal::Type::FileInput
|
|
167
|
-
|
|
168
|
-
# @!attribute gender
|
|
169
|
-
# Gender of the voice clone.
|
|
170
|
-
#
|
|
171
|
-
# @return [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone::Gender]
|
|
172
|
-
required :gender,
|
|
173
|
-
enum: -> { Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone::Gender }
|
|
174
|
-
|
|
175
|
-
# @!attribute language
|
|
176
|
-
# ISO 639-1 language code from the Ultra language set (40 languages).
|
|
177
|
-
#
|
|
178
|
-
# @return [String]
|
|
179
|
-
required :language, String
|
|
180
|
-
|
|
181
|
-
# @!attribute model_id
|
|
182
|
-
# TTS model identifier. Must be `Ultra`.
|
|
183
|
-
#
|
|
184
|
-
# @return [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone::ModelID]
|
|
185
|
-
required :model_id,
|
|
186
|
-
enum: -> { Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone::ModelID }
|
|
187
|
-
|
|
188
|
-
# @!attribute name
|
|
189
|
-
# Name for the voice clone.
|
|
190
|
-
#
|
|
191
|
-
# @return [String]
|
|
192
|
-
required :name, String
|
|
193
|
-
|
|
194
|
-
# @!attribute provider
|
|
195
|
-
# Voice synthesis provider. Must be `telnyx`.
|
|
196
|
-
#
|
|
197
|
-
# @return [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone::Provider]
|
|
198
|
-
required :provider,
|
|
199
|
-
enum: -> { Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone::Provider }
|
|
200
|
-
|
|
201
|
-
# @!attribute label
|
|
202
|
-
# Optional custom label describing the voice style.
|
|
203
|
-
#
|
|
204
|
-
# @return [String, nil]
|
|
205
|
-
optional :label, String
|
|
206
|
-
|
|
207
|
-
# @!attribute ref_text
|
|
208
|
-
# Optional transcript of the audio file. Providing this improves clone quality.
|
|
209
|
-
#
|
|
210
|
-
# @return [String, nil]
|
|
211
|
-
optional :ref_text, String
|
|
212
|
-
|
|
213
|
-
# @!method initialize(audio_file:, gender:, language:, model_id:, name:, provider:, label: nil, ref_text: nil)
|
|
214
|
-
# Some parameter documentations has been truncated, see
|
|
215
|
-
# {Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone}
|
|
216
|
-
# for more details.
|
|
217
|
-
#
|
|
218
|
-
# Upload-based voice clone using the Telnyx Ultra model.
|
|
219
|
-
#
|
|
220
|
-
# @param audio_file [Pathname, StringIO, IO, String, Telnyx::FilePart] Audio file to clone the voice from. Supported formats: WAV, MP3, FLAC, OGG, M4A.
|
|
221
|
-
#
|
|
222
|
-
# @param gender [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone::Gender] Gender of the voice clone.
|
|
223
|
-
#
|
|
224
|
-
# @param language [String] ISO 639-1 language code from the Ultra language set (40 languages).
|
|
225
|
-
#
|
|
226
|
-
# @param model_id [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone::ModelID] TTS model identifier. Must be `Ultra`.
|
|
227
|
-
#
|
|
228
|
-
# @param name [String] Name for the voice clone.
|
|
229
|
-
#
|
|
230
|
-
# @param provider [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone::Provider] Voice synthesis provider. Must be `telnyx`.
|
|
231
|
-
#
|
|
232
|
-
# @param label [String] Optional custom label describing the voice style.
|
|
233
|
-
#
|
|
234
|
-
# @param ref_text [String] Optional transcript of the audio file. Providing this improves clone quality.
|
|
235
|
-
|
|
236
|
-
# Gender of the voice clone.
|
|
237
|
-
#
|
|
238
|
-
# @see Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone#gender
|
|
239
|
-
module Gender
|
|
240
|
-
extend Telnyx::Internal::Type::Enum
|
|
241
|
-
|
|
242
|
-
MALE = :male
|
|
243
|
-
FEMALE = :female
|
|
244
|
-
NEUTRAL = :neutral
|
|
245
|
-
|
|
246
|
-
# @!method self.values
|
|
247
|
-
# @return [Array<Symbol>]
|
|
248
|
-
end
|
|
249
|
-
|
|
250
|
-
# TTS model identifier. Must be `Ultra`.
|
|
251
|
-
#
|
|
252
|
-
# @see Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone#model_id
|
|
253
|
-
module ModelID
|
|
254
|
-
extend Telnyx::Internal::Type::Enum
|
|
255
|
-
|
|
256
|
-
ULTRA = :Ultra
|
|
257
|
-
|
|
258
|
-
# @!method self.values
|
|
259
|
-
# @return [Array<Symbol>]
|
|
260
|
-
end
|
|
261
|
-
|
|
262
|
-
# Voice synthesis provider. Must be `telnyx`.
|
|
263
|
-
#
|
|
264
|
-
# @see Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone#provider
|
|
265
|
-
module Provider
|
|
266
|
-
extend Telnyx::Internal::Type::Enum
|
|
267
|
-
|
|
268
|
-
TELNYX = :telnyx
|
|
269
|
-
MINIMAX = :minimax
|
|
270
|
-
|
|
271
|
-
# @!method self.values
|
|
272
|
-
# @return [Array<Symbol>]
|
|
273
|
-
end
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
class MinimaxClone < Telnyx::Internal::Type::BaseModel
|
|
277
|
-
# @!attribute audio_file
|
|
278
|
-
# Audio file to clone the voice from. Supported formats: WAV, MP3, FLAC, OGG, M4A.
|
|
279
|
-
# For best quality, provide 5–10 seconds of clear, uninterrupted speech. Maximum
|
|
280
|
-
# size: 20MB.
|
|
281
|
-
#
|
|
282
|
-
# @return [Pathname, StringIO, IO, String, Telnyx::FilePart]
|
|
283
|
-
required :audio_file, Telnyx::Internal::Type::FileInput
|
|
284
|
-
|
|
285
|
-
# @!attribute gender
|
|
286
|
-
# Gender of the voice clone.
|
|
287
|
-
#
|
|
288
|
-
# @return [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone::Gender]
|
|
289
|
-
required :gender,
|
|
290
|
-
enum: -> { Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone::Gender }
|
|
291
|
-
|
|
292
|
-
# @!attribute language
|
|
293
|
-
# ISO 639-1 language code from the Minimax language set.
|
|
294
|
-
#
|
|
295
|
-
# @return [String]
|
|
296
|
-
required :language, String
|
|
297
|
-
|
|
298
|
-
# @!attribute name
|
|
299
|
-
# Name for the voice clone.
|
|
300
|
-
#
|
|
301
|
-
# @return [String]
|
|
302
|
-
required :name, String
|
|
303
|
-
|
|
304
|
-
# @!attribute provider
|
|
305
|
-
# Voice synthesis provider. Must be `minimax`.
|
|
306
|
-
#
|
|
307
|
-
# @return [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone::Provider]
|
|
308
|
-
required :provider,
|
|
309
|
-
enum: -> { Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone::Provider }
|
|
310
|
-
|
|
311
|
-
# @!attribute label
|
|
312
|
-
# Optional custom label describing the voice style.
|
|
313
|
-
#
|
|
314
|
-
# @return [String, nil]
|
|
315
|
-
optional :label, String
|
|
316
|
-
|
|
317
|
-
# @!attribute model_id
|
|
318
|
-
# TTS model identifier. Nullable — defaults to speech-2.8-turbo.
|
|
319
|
-
#
|
|
320
|
-
# @return [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone::ModelID, nil]
|
|
321
|
-
optional :model_id,
|
|
322
|
-
enum: -> { Telnyx::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone::ModelID },
|
|
323
|
-
nil?: true
|
|
324
|
-
|
|
325
|
-
# @!attribute ref_text
|
|
326
|
-
# Optional transcript of the audio file. Providing this improves clone quality.
|
|
327
|
-
#
|
|
328
|
-
# @return [String, nil]
|
|
329
|
-
optional :ref_text, String
|
|
330
|
-
|
|
331
|
-
# @!method initialize(audio_file:, gender:, language:, name:, provider:, label: nil, model_id: nil, ref_text: nil)
|
|
332
|
-
# Some parameter documentations has been truncated, see
|
|
333
|
-
# {Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone}
|
|
334
|
-
# for more details.
|
|
335
|
-
#
|
|
336
|
-
# Upload-based voice clone using the Minimax provider.
|
|
337
|
-
#
|
|
338
|
-
# @param audio_file [Pathname, StringIO, IO, String, Telnyx::FilePart] Audio file to clone the voice from. Supported formats: WAV, MP3, FLAC, OGG, M4A.
|
|
339
|
-
#
|
|
340
|
-
# @param gender [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone::Gender] Gender of the voice clone.
|
|
341
|
-
#
|
|
342
|
-
# @param language [String] ISO 639-1 language code from the Minimax language set.
|
|
343
|
-
#
|
|
344
|
-
# @param name [String] Name for the voice clone.
|
|
345
|
-
#
|
|
346
|
-
# @param provider [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone::Provider] Voice synthesis provider. Must be `minimax`.
|
|
347
|
-
#
|
|
348
|
-
# @param label [String] Optional custom label describing the voice style.
|
|
349
|
-
#
|
|
350
|
-
# @param model_id [Symbol, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone::ModelID, nil] TTS model identifier. Nullable — defaults to speech-2.8-turbo.
|
|
351
|
-
#
|
|
352
|
-
# @param ref_text [String] Optional transcript of the audio file. Providing this improves clone quality.
|
|
353
|
-
|
|
354
|
-
# Gender of the voice clone.
|
|
355
|
-
#
|
|
356
|
-
# @see Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone#gender
|
|
357
|
-
module Gender
|
|
358
|
-
extend Telnyx::Internal::Type::Enum
|
|
359
|
-
|
|
360
|
-
MALE = :male
|
|
361
|
-
FEMALE = :female
|
|
362
|
-
NEUTRAL = :neutral
|
|
363
|
-
|
|
364
|
-
# @!method self.values
|
|
365
|
-
# @return [Array<Symbol>]
|
|
366
|
-
end
|
|
367
|
-
|
|
368
|
-
# Voice synthesis provider. Must be `minimax`.
|
|
369
|
-
#
|
|
370
|
-
# @see Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone#provider
|
|
371
|
-
module Provider
|
|
372
|
-
extend Telnyx::Internal::Type::Enum
|
|
373
|
-
|
|
374
|
-
TELNYX = :telnyx
|
|
375
|
-
MINIMAX = :minimax
|
|
376
|
-
|
|
377
|
-
# @!method self.values
|
|
378
|
-
# @return [Array<Symbol>]
|
|
379
|
-
end
|
|
380
|
-
|
|
381
|
-
# TTS model identifier. Nullable — defaults to speech-2.8-turbo.
|
|
382
|
-
#
|
|
383
|
-
# @see Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone#model_id
|
|
384
|
-
module ModelID
|
|
385
|
-
extend Telnyx::Internal::Type::Enum
|
|
386
|
-
|
|
387
|
-
SPEECH_2_8_TURBO = :"speech-2.8-turbo"
|
|
388
|
-
|
|
389
|
-
# @!method self.values
|
|
390
|
-
# @return [Array<Symbol>]
|
|
391
|
-
end
|
|
392
|
-
end
|
|
393
|
-
|
|
394
|
-
# @!method self.variants
|
|
395
|
-
# @return [Array(Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxQwen3TtsClone, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::TelnyxUltraClone, Telnyx::Models::VoiceCloneCreateFromUploadParams::UploadParams::MinimaxClone)]
|
|
396
|
-
end
|
|
397
18
|
end
|
|
398
19
|
end
|
|
399
20
|
end
|
|
@@ -113,17 +113,13 @@ module Telnyx
|
|
|
113
113
|
)
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
-
# Some parameter documentations has been truncated, see
|
|
117
|
-
# {Telnyx::Models::VoiceCloneCreateFromUploadParams} for more details.
|
|
118
|
-
#
|
|
119
116
|
# Creates a new voice clone by uploading an audio file directly. Supported
|
|
120
117
|
# formats: WAV, MP3, FLAC, OGG, M4A. For best results, provide 5–10 seconds of
|
|
121
118
|
# clear speech. Maximum file size: 5MB for Telnyx, 20MB for Minimax.
|
|
122
119
|
#
|
|
123
120
|
# @overload create_from_upload(upload_params:, request_options: {})
|
|
124
121
|
#
|
|
125
|
-
# @param upload_params [
|
|
126
|
-
#
|
|
122
|
+
# @param upload_params [Object]
|
|
127
123
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
128
124
|
#
|
|
129
125
|
# @return [Telnyx::Models::VoiceCloneCreateFromUploadResponse]
|
data/lib/telnyx/version.rb
CHANGED
data/lib/telnyx.rb
CHANGED
|
@@ -2703,3 +2703,7 @@ require_relative "telnyx/resources/wireless_blocklists"
|
|
|
2703
2703
|
require_relative "telnyx/resources/wireless_blocklist_values"
|
|
2704
2704
|
require_relative "telnyx/resources/x402"
|
|
2705
2705
|
require_relative "telnyx/resources/x402/credit_account"
|
|
2706
|
+
|
|
2707
|
+
# Custom lib entry point — preserved across codegen.
|
|
2708
|
+
# If this line is lost after a Stainless codegen run, it must be re-added.
|
|
2709
|
+
require_relative "telnyx/lib"
|