@picsart/ai-sdk 5.26.1 → 5.26.2
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.
- package/index.d.ts +3 -9
- package/index.js +29 -15
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -142,19 +142,14 @@ type ModelInputById = {
|
|
|
142
142
|
};
|
|
143
143
|
"eleven-dubbing": {
|
|
144
144
|
audioUrl: string;
|
|
145
|
-
language
|
|
146
|
-
accent?: string;
|
|
145
|
+
language: string;
|
|
147
146
|
};
|
|
148
147
|
"eleven-multilingual-sts-v2": {
|
|
149
148
|
audioUrl: string;
|
|
150
149
|
voiceId?: string;
|
|
151
|
-
language?: string;
|
|
152
|
-
accent?: string;
|
|
153
150
|
removeBackgroundNoise?: boolean;
|
|
154
151
|
};
|
|
155
152
|
"eleven-multilingual-v2": {
|
|
156
|
-
language?: string;
|
|
157
|
-
accent?: string;
|
|
158
153
|
prompt: string;
|
|
159
154
|
voiceId?: string;
|
|
160
155
|
};
|
|
@@ -165,7 +160,6 @@ type ModelInputById = {
|
|
|
165
160
|
};
|
|
166
161
|
"eleven-v3": {
|
|
167
162
|
language?: string;
|
|
168
|
-
accent?: string;
|
|
169
163
|
prompt: string;
|
|
170
164
|
voiceId?: string;
|
|
171
165
|
};
|
|
@@ -179,7 +173,7 @@ type ModelInputById = {
|
|
|
179
173
|
prompt: string;
|
|
180
174
|
};
|
|
181
175
|
"eleven-voice-remix": {
|
|
182
|
-
voiceId
|
|
176
|
+
voiceId: string;
|
|
183
177
|
prompt: string;
|
|
184
178
|
};
|
|
185
179
|
"elevenlabs-music-v2": {
|
|
@@ -189,7 +183,7 @@ type ModelInputById = {
|
|
|
189
183
|
};
|
|
190
184
|
"elevenlabs-sfx": {
|
|
191
185
|
prompt: string;
|
|
192
|
-
duration?:
|
|
186
|
+
duration?: number;
|
|
193
187
|
};
|
|
194
188
|
"flux-2-flex": {
|
|
195
189
|
prompt: string;
|
package/index.js
CHANGED
|
@@ -6172,8 +6172,9 @@ var buildElevenLabsDubbingPayload = (ctx) => ({
|
|
|
6172
6172
|
target_lang: ctx.language
|
|
6173
6173
|
});
|
|
6174
6174
|
var buildElevenLabsVoiceRemixPayload = (ctx) => ({
|
|
6175
|
-
voice_id: ctx.voiceId
|
|
6176
|
-
voice_description: ctx.prompt
|
|
6175
|
+
voice_id: ctx.voiceId,
|
|
6176
|
+
voice_description: ctx.prompt,
|
|
6177
|
+
auto_generate_text: true
|
|
6177
6178
|
});
|
|
6178
6179
|
var buildElevenLabsVoiceDesignPayload = (modelId) => (ctx) => ({
|
|
6179
6180
|
voice_description: ctx.prompt,
|
|
@@ -6184,8 +6185,11 @@ var buildElevenLabsVoicePreviewsPayload = (ctx) => ({
|
|
|
6184
6185
|
voice_description: ctx.prompt,
|
|
6185
6186
|
auto_generate_text: true
|
|
6186
6187
|
});
|
|
6187
|
-
var ttsParamConfig = (promptMaxLength) => ({
|
|
6188
|
-
|
|
6188
|
+
var ttsParamConfig = (promptMaxLength, withLanguage) => ({
|
|
6189
|
+
// language_code is honoured by eleven_v3 only — the vendor documents it as
|
|
6190
|
+
// "not supported for multilingual_v2 models" (silently ignored there).
|
|
6191
|
+
// No accent param anywhere: no builder ever read it.
|
|
6192
|
+
...withLanguage ? params.language(false) : {},
|
|
6189
6193
|
...params.prompt({ maxLength: promptMaxLength }),
|
|
6190
6194
|
...params.voiceId([], DEFAULT_VOICE_ID, { catalog: { workflow: "elevenlabs/v1/catalog/voices" } })
|
|
6191
6195
|
});
|
|
@@ -6204,7 +6208,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
|
6204
6208
|
badge: ["popular"],
|
|
6205
6209
|
description: "Latest voice engine with expanded tone and pacing control.",
|
|
6206
6210
|
features: [feat("Experimental", "characteristic"), feat("Creative Control", "characteristic")],
|
|
6207
|
-
paramConfig: ttsParamConfig(5e3)
|
|
6211
|
+
paramConfig: ttsParamConfig(5e3, true)
|
|
6208
6212
|
},
|
|
6209
6213
|
{
|
|
6210
6214
|
id: "eleven-multilingual-v2",
|
|
@@ -6219,7 +6223,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
|
6219
6223
|
badge: ["popular", "fast"],
|
|
6220
6224
|
description: "Stable multilingual speech across 29+ languages with natural rhythm.",
|
|
6221
6225
|
features: [feat("Stable", "characteristic"), feat("Professional", "characteristic")],
|
|
6222
|
-
paramConfig: ttsParamConfig(1e4)
|
|
6226
|
+
paramConfig: ttsParamConfig(1e4, false)
|
|
6223
6227
|
},
|
|
6224
6228
|
// ── Sound Effects ─────────────────────────────────────────────────
|
|
6225
6229
|
{
|
|
@@ -6233,9 +6237,9 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
|
6233
6237
|
mode: "audio",
|
|
6234
6238
|
inputType: "sfx",
|
|
6235
6239
|
badge: ["popular"],
|
|
6236
|
-
description: "Create custom sound effects from a text description \u2014 up to
|
|
6240
|
+
description: "Create custom sound effects from a text description \u2014 up to 30 seconds.",
|
|
6237
6241
|
features: [feat("Sound Effects", "characteristic")],
|
|
6238
|
-
paramConfig: { ...params.prompt(), ...params.
|
|
6242
|
+
paramConfig: { ...params.prompt(), ...params.durationRange(0.5, 30, 5, 0.5) }
|
|
6239
6243
|
},
|
|
6240
6244
|
// ── Music ─────────────────────────────────────────────────────────
|
|
6241
6245
|
{
|
|
@@ -6289,7 +6293,6 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
|
6289
6293
|
paramConfig: {
|
|
6290
6294
|
...params.audioInput("Speech Audio", true),
|
|
6291
6295
|
...params.voiceId([], DEFAULT_VOICE_ID, { catalog: { workflow: "elevenlabs/v1/catalog/voices" } }),
|
|
6292
|
-
...params.language(true),
|
|
6293
6296
|
...p.boolean("removeBackgroundNoise", false, "Remove Background Noise")
|
|
6294
6297
|
}
|
|
6295
6298
|
},
|
|
@@ -6320,7 +6323,12 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
|
6320
6323
|
features: [feat("Multilingual", "characteristic"), feat("Dubbing", "characteristic")],
|
|
6321
6324
|
paramConfig: {
|
|
6322
6325
|
...params.audioInput("Source Audio", true),
|
|
6323
|
-
|
|
6326
|
+
// target_lang is the vendor's only required field (ISO 639-1/639-3 code).
|
|
6327
|
+
language: {
|
|
6328
|
+
label: "Target Language (ISO 639 code)",
|
|
6329
|
+
required: true,
|
|
6330
|
+
descriptor: { kind: "text", placeholder: "e.g. es, fr, de" }
|
|
6331
|
+
}
|
|
6324
6332
|
}
|
|
6325
6333
|
},
|
|
6326
6334
|
// ── Voice Design ────────────────────────────────────────────────
|
|
@@ -6337,8 +6345,14 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
|
6337
6345
|
description: "Remix voice characteristics by describing the desired vocal style.",
|
|
6338
6346
|
features: [feat("Voice Design", "characteristic"), feat("Remix", "characteristic")],
|
|
6339
6347
|
paramConfig: {
|
|
6340
|
-
|
|
6341
|
-
|
|
6348
|
+
// Vendor: "Only your own custom voices can be remixed" — the premade
|
|
6349
|
+
// voices catalog cannot serve this model, so voiceId is a plain id input.
|
|
6350
|
+
voiceId: {
|
|
6351
|
+
label: "Voice ID (a custom voice from your workspace)",
|
|
6352
|
+
required: true,
|
|
6353
|
+
descriptor: { kind: "text", placeholder: "Premade/catalog voices are rejected by ElevenLabs" }
|
|
6354
|
+
},
|
|
6355
|
+
...params.prompt({ minLength: 5, maxLength: 1e3 })
|
|
6342
6356
|
}
|
|
6343
6357
|
},
|
|
6344
6358
|
{
|
|
@@ -6353,7 +6367,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
|
6353
6367
|
inputType: "tts",
|
|
6354
6368
|
description: "Design a new voice from a text description using v3 engine.",
|
|
6355
6369
|
features: [feat("Voice Design", "characteristic"), feat("Preview", "characteristic")],
|
|
6356
|
-
paramConfig: { ...params.prompt({ maxLength: 1e3 }) }
|
|
6370
|
+
paramConfig: { ...params.prompt({ minLength: 20, maxLength: 1e3 }) }
|
|
6357
6371
|
},
|
|
6358
6372
|
{
|
|
6359
6373
|
id: "eleven-voice-design-v2",
|
|
@@ -6367,7 +6381,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
|
6367
6381
|
inputType: "tts",
|
|
6368
6382
|
description: "Design a new voice from a text description with multilingual support.",
|
|
6369
6383
|
features: [feat("Voice Design", "characteristic"), feat("Multilingual", "characteristic"), feat("Preview", "characteristic")],
|
|
6370
|
-
paramConfig: { ...params.prompt({ maxLength: 1e3 }) }
|
|
6384
|
+
paramConfig: { ...params.prompt({ minLength: 20, maxLength: 1e3 }) }
|
|
6371
6385
|
},
|
|
6372
6386
|
{
|
|
6373
6387
|
id: "eleven-voice-create",
|
|
@@ -6380,7 +6394,7 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
|
6380
6394
|
inputType: "tts",
|
|
6381
6395
|
description: "Generate voice previews from a description to audition before committing.",
|
|
6382
6396
|
features: [feat("Voice Design", "characteristic"), feat("Preview", "characteristic")],
|
|
6383
|
-
paramConfig: { ...params.prompt({ maxLength: 1e3 }) }
|
|
6397
|
+
paramConfig: { ...params.prompt({ minLength: 20, maxLength: 1e3 }) }
|
|
6384
6398
|
}
|
|
6385
6399
|
]);
|
|
6386
6400
|
|