@picsart/ai-sdk 6.11.0 → 6.12.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.
- package/_vendor/workflows-types/index.d.ts +1770 -1714
- package/index.d.ts +56 -32
- package/index.js +94 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -204,6 +204,16 @@ type ModelInputById = {
|
|
|
204
204
|
styleExaggeration?: number;
|
|
205
205
|
speed?: number;
|
|
206
206
|
useSpeakerBoost?: boolean;
|
|
207
|
+
withTimestamps?: boolean;
|
|
208
|
+
};
|
|
209
|
+
"eleven-speech-to-text": {
|
|
210
|
+
audioUrl: string;
|
|
211
|
+
language?: string;
|
|
212
|
+
diarize?: boolean;
|
|
213
|
+
numSpeakers?: number;
|
|
214
|
+
timestampsGranularity?: "word" | "character";
|
|
215
|
+
tagAudioEvents?: boolean;
|
|
216
|
+
seed?: number;
|
|
207
217
|
};
|
|
208
218
|
"eleven-sts-v2": {
|
|
209
219
|
audioUrl: string;
|
|
@@ -232,6 +242,11 @@ type ModelInputById = {
|
|
|
232
242
|
styleExaggeration?: number;
|
|
233
243
|
speed?: number;
|
|
234
244
|
useSpeakerBoost?: boolean;
|
|
245
|
+
withTimestamps?: boolean;
|
|
246
|
+
};
|
|
247
|
+
"eleven-video-to-music": {
|
|
248
|
+
videoUrls: [string, ...string[]];
|
|
249
|
+
prompt?: string;
|
|
235
250
|
};
|
|
236
251
|
"eleven-voice-create": {
|
|
237
252
|
prompt: string;
|
|
@@ -1885,9 +1900,36 @@ type ModelInputById = {
|
|
|
1885
1900
|
type TypedModelId = keyof ModelInputById;
|
|
1886
1901
|
type ModelInput<M extends TypedModelId> = ModelInputById[M];
|
|
1887
1902
|
/** IDs of text-generation (LLM) models — narrows generateText(). */
|
|
1888
|
-
type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra";
|
|
1903
|
+
type TextModelId = "claude-fable-5" | "claude-fable-5-1" | "claude-haiku-4-5" | "claude-opus-4-8" | "claude-opus-5" | "claude-sonnet-4-5" | "claude-sonnet-4-6" | "claude-sonnet-5" | "eleven-speech-to-text" | "gemini-2.5-flash" | "gemini-3-pro" | "gemini-3.5-flash-lite" | "gemini-3.6-flash" | "gemini-3.7-flash" | "gemini-3.8-flash" | "gpt-4.1-mini" | "gpt-4.1-nano" | "gpt-4o" | "gpt-4o-mini" | "gpt-5" | "gpt-5-mini" | "gpt-5.1" | "gpt-5.2" | "gpt-5.5" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra" | "gpt-6-astra";
|
|
1889
1904
|
type TextModelInputById = Pick<ModelInputById, TextModelId>;
|
|
1890
1905
|
|
|
1906
|
+
/**
|
|
1907
|
+
* Per-item vendor metadata promoted from the response. Every key is
|
|
1908
|
+
* best-effort: present when the vendor reports it, absent otherwise.
|
|
1909
|
+
*/
|
|
1910
|
+
interface GenerateResultItemMetadata {
|
|
1911
|
+
/** Explore image id (recraft explore models) — pass back as `sourceImageId`
|
|
1912
|
+
* to iterate on this image. */
|
|
1913
|
+
exploreImageId?: string;
|
|
1914
|
+
/** Voice preview id (ElevenLabs voice design/remix) — pass to the vendor's
|
|
1915
|
+
* create-voice-from-preview step to persist the voice. */
|
|
1916
|
+
generatedVoiceId?: string;
|
|
1917
|
+
/** URL of the generated video's last frame, when the model was asked for it
|
|
1918
|
+
* (`returnLastFrame`, seedance) — the seed for frame-chaining flows. */
|
|
1919
|
+
lastFrameUrl?: string;
|
|
1920
|
+
/** The draft a Seedance 2.5 Draft generation produced — pass it back
|
|
1921
|
+
* unchanged as `draftTask` to the matching `-draft-final` model to render
|
|
1922
|
+
* the final 1080p video (valid 7 days). Wire field names on purpose: the
|
|
1923
|
+
* worker signs it, so any change is rejected. */
|
|
1924
|
+
draftTask?: SeedanceDraftTask;
|
|
1925
|
+
}
|
|
1926
|
+
/** A Seedance 2.5 draft reference, as the worker issues it. */
|
|
1927
|
+
interface SeedanceDraftTask {
|
|
1928
|
+
id: string;
|
|
1929
|
+
video_input: boolean;
|
|
1930
|
+
signature: string;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1891
1933
|
/**
|
|
1892
1934
|
* Drive client — manages folders and file saving in Picsart Drive.
|
|
1893
1935
|
*
|
|
@@ -1937,7 +1979,14 @@ interface DriveAttributes {
|
|
|
1937
1979
|
appId?: string;
|
|
1938
1980
|
appType?: AppType;
|
|
1939
1981
|
}
|
|
1940
|
-
|
|
1982
|
+
/** A saved Seedance 2.5 draft — pass `draftTask` unchanged as the final's
|
|
1983
|
+
* `draftTask` param until `draftExpiresAt`. */
|
|
1984
|
+
interface DriveDraftInfo {
|
|
1985
|
+
draftTask?: SeedanceDraftTask;
|
|
1986
|
+
/** ISO timestamp after which the vendor no longer renders a final from it. */
|
|
1987
|
+
draftExpiresAt?: string;
|
|
1988
|
+
}
|
|
1989
|
+
interface GenerationFile extends DriveDraftInfo {
|
|
1941
1990
|
appId?: string;
|
|
1942
1991
|
appType?: AppType;
|
|
1943
1992
|
model?: string;
|
|
@@ -1952,7 +2001,7 @@ interface DriveMediaItem {
|
|
|
1952
2001
|
previewUrl?: string;
|
|
1953
2002
|
timestamp: number;
|
|
1954
2003
|
}
|
|
1955
|
-
interface DriveFileDetails extends DriveMediaItem {
|
|
2004
|
+
interface DriveFileDetails extends DriveMediaItem, DriveDraftInfo {
|
|
1956
2005
|
createdAt?: string;
|
|
1957
2006
|
model?: string;
|
|
1958
2007
|
prompt?: string;
|
|
@@ -2389,7 +2438,7 @@ type Provider = AppProvider;
|
|
|
2389
2438
|
/** App generation modes. */
|
|
2390
2439
|
type GenerationMode = 'video' | 'image' | 'audio' | 'text';
|
|
2391
2440
|
/** App input types. */
|
|
2392
|
-
type InputType = 't2v' | 'i2v' | 'v2v' | 'a2v' | 't2i' | 'i2i' | 't2a' | 'v2a' | 'tts' | 'sts' | 'sfx' | 'music' | 't2t' | 'i2t' | 'v2t';
|
|
2441
|
+
type InputType = 't2v' | 'i2v' | 'v2v' | 'a2v' | 't2i' | 'i2i' | 't2a' | 'v2a' | 'tts' | 'sts' | 'sfx' | 'music' | 't2t' | 'i2t' | 'v2t' | 'a2t';
|
|
2393
2442
|
interface ModelFeature {
|
|
2394
2443
|
label: string;
|
|
2395
2444
|
variant: 'frame' | 'resolution' | 'audio' | 'duration' | 'input' | 'quality' | 'style' | 'characteristic';
|
|
@@ -2709,33 +2758,6 @@ interface CatalogsOptions {
|
|
|
2709
2758
|
preload?: boolean;
|
|
2710
2759
|
}
|
|
2711
2760
|
|
|
2712
|
-
/**
|
|
2713
|
-
* Per-item vendor metadata promoted from the response. Every key is
|
|
2714
|
-
* best-effort: present when the vendor reports it, absent otherwise.
|
|
2715
|
-
*/
|
|
2716
|
-
interface GenerateResultItemMetadata {
|
|
2717
|
-
/** Explore image id (recraft explore models) — pass back as `sourceImageId`
|
|
2718
|
-
* to iterate on this image. */
|
|
2719
|
-
exploreImageId?: string;
|
|
2720
|
-
/** Voice preview id (ElevenLabs voice design/remix) — pass to the vendor's
|
|
2721
|
-
* create-voice-from-preview step to persist the voice. */
|
|
2722
|
-
generatedVoiceId?: string;
|
|
2723
|
-
/** URL of the generated video's last frame, when the model was asked for it
|
|
2724
|
-
* (`returnLastFrame`, seedance) — the seed for frame-chaining flows. */
|
|
2725
|
-
lastFrameUrl?: string;
|
|
2726
|
-
/** The draft a Seedance 2.5 Draft generation produced — pass it back
|
|
2727
|
-
* unchanged as `draftTask` to the matching `-draft-final` model to render
|
|
2728
|
-
* the final 1080p video (valid 7 days). Wire field names on purpose: the
|
|
2729
|
-
* worker signs it, so any change is rejected. */
|
|
2730
|
-
draftTask?: SeedanceDraftTask;
|
|
2731
|
-
}
|
|
2732
|
-
/** A Seedance 2.5 draft reference, as the worker issues it. */
|
|
2733
|
-
interface SeedanceDraftTask {
|
|
2734
|
-
id: string;
|
|
2735
|
-
video_input: boolean;
|
|
2736
|
-
signature: string;
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
2761
|
/**
|
|
2740
2762
|
* Failure codes the SDK synthesizes when the platform supplies no `reason`.
|
|
2741
2763
|
* An API-supplied `reason` passes through unchanged, so the open `string`
|
|
@@ -3076,9 +3098,11 @@ declare const Models: {
|
|
|
3076
3098
|
readonly ElevenDubbing: "eleven-dubbing";
|
|
3077
3099
|
readonly ElevenMultilingualStsV2: "eleven-multilingual-sts-v2";
|
|
3078
3100
|
readonly ElevenMultilingualV2: "eleven-multilingual-v2";
|
|
3101
|
+
readonly ElevenSpeechToText: "eleven-speech-to-text";
|
|
3079
3102
|
readonly ElevenStsV2: "eleven-sts-v2";
|
|
3080
3103
|
readonly ElevenTextToDialogue: "eleven-text-to-dialogue";
|
|
3081
3104
|
readonly ElevenV3: "eleven-v3";
|
|
3105
|
+
readonly ElevenVideoToMusic: "eleven-video-to-music";
|
|
3082
3106
|
readonly ElevenVoiceCreate: "eleven-voice-create";
|
|
3083
3107
|
readonly ElevenVoiceDesignV2: "eleven-voice-design-v2";
|
|
3084
3108
|
readonly ElevenVoiceDesignV3: "eleven-voice-design-v3";
|
|
@@ -3443,4 +3467,4 @@ declare const getModel: (id: string) => ModelDefinition | undefined;
|
|
|
3443
3467
|
*/
|
|
3444
3468
|
declare const findModel: (ref: string) => ModelDefinition | undefined;
|
|
3445
3469
|
|
|
3446
|
-
export { ALL_MODELS, type AiClient, ApiError, type ApiErrorCode, type ApiErrorInit, type ApiResponse, type ApiRunOptions, type ApiSchemas, type ApisClient, type AppIdentity, type AppType, type AuthenticatedFetch, type AvatarOption, type BooleanDescriptor, type BooleanEntry, type CatalogDescriptor, type CatalogEntry, type CatalogItem, type CatalogPage, type CatalogPageOptions, type CatalogPreview, type CatalogQuery, type CatalogResult, type CatalogSource, type CatalogsClient, type CatalogsOptions, type ClientConfig, type CreditRange, type CreditRangeContext, type CreditTier, type CreditUsage, DEFAULT_VISIBLE_RELEASES, type DeepLinkResult, type DriveAttributes, type DriveClient, type DriveConfig, type DriveFile, type DriveFileDetails, type DriveFolder, type DriveMediaItem, type DriveSaveResult, type EntryMeta, type EnumDescriptor, type EnumEntry, type EnumOption, type FileDescriptor, type FileEntry, type FlatParamEntry, type GenerateOptions, type GenerateResult, type GenerateResultItem, type GenerateResultItemMetadata, type GenerateTextResult, type GenerationContext, type GenerationEvent, GenerationEventType, type GenerationFile, type GenerationMode, type GenerationOptions, type GenerationProgress, type ListOptions, type MediaModelId, type MediaTypeFilter, Model, type ModelDefinition, type ModelDescriptor, type ModelFilter, type ModelInput, type ModelInputById, type ModelMeta, type ModelParams, type ModelParamsAccessor, Models, type ObjectDescriptor, type ObjectEntry, type ParamDescriptor, type ParamEntry, type ParamOption, type PayloadDriveFolderOptions, type PayloadDriveOptions, type PayloadInputsTransformationOptions, type PricingOptions, type ProviderInfo, type RangeDescriptor, type RangeEntry, type ReleaseTag, type SaveParams, type SdkPayload, type SdkTransport, type SeedanceDraftTask, type TextDescriptor, type TextEntry, type TextModelId, type TextModelInputById, type ToolUsage, type TransportPollOptions, type TransportResult, type TypedModelId, type UserReaction, type ValidationResult, type VoiceOption, type WorkflowJobHandle, type WorkflowSubmitRequest, buildFilename, buildGenerationAttributes, catalog, createClient, decodeDeepLinkPayload, encodeDeepLinkPayload, findModel, getModel, getModelsByMode, getVoiceById, inferResourceType, isVisibleForReleases, parseGeneration, releaseOf, toAvatarOption, toVoiceOption };
|
|
3470
|
+
export { ALL_MODELS, type AiClient, ApiError, type ApiErrorCode, type ApiErrorInit, type ApiResponse, type ApiRunOptions, type ApiSchemas, type ApisClient, type AppIdentity, type AppType, type AuthenticatedFetch, type AvatarOption, type BooleanDescriptor, type BooleanEntry, type CatalogDescriptor, type CatalogEntry, type CatalogItem, type CatalogPage, type CatalogPageOptions, type CatalogPreview, type CatalogQuery, type CatalogResult, type CatalogSource, type CatalogsClient, type CatalogsOptions, type ClientConfig, type CreditRange, type CreditRangeContext, type CreditTier, type CreditUsage, DEFAULT_VISIBLE_RELEASES, type DeepLinkResult, type DriveAttributes, type DriveClient, type DriveConfig, type DriveDraftInfo, type DriveFile, type DriveFileDetails, type DriveFolder, type DriveMediaItem, type DriveSaveResult, type EntryMeta, type EnumDescriptor, type EnumEntry, type EnumOption, type FileDescriptor, type FileEntry, type FlatParamEntry, type GenerateOptions, type GenerateResult, type GenerateResultItem, type GenerateResultItemMetadata, type GenerateTextResult, type GenerationContext, type GenerationEvent, GenerationEventType, type GenerationFile, type GenerationMode, type GenerationOptions, type GenerationProgress, type ListOptions, type MediaModelId, type MediaTypeFilter, Model, type ModelDefinition, type ModelDescriptor, type ModelFilter, type ModelInput, type ModelInputById, type ModelMeta, type ModelParams, type ModelParamsAccessor, Models, type ObjectDescriptor, type ObjectEntry, type ParamDescriptor, type ParamEntry, type ParamOption, type PayloadDriveFolderOptions, type PayloadDriveOptions, type PayloadInputsTransformationOptions, type PricingOptions, type ProviderInfo, type RangeDescriptor, type RangeEntry, type ReleaseTag, type SaveParams, type SdkPayload, type SdkTransport, type SeedanceDraftTask, type TextDescriptor, type TextEntry, type TextModelId, type TextModelInputById, type ToolUsage, type TransportPollOptions, type TransportResult, type TypedModelId, type UserReaction, type ValidationResult, type VoiceOption, type WorkflowJobHandle, type WorkflowSubmitRequest, buildFilename, buildGenerationAttributes, catalog, createClient, decodeDeepLinkPayload, encodeDeepLinkPayload, findModel, getModel, getModelsByMode, getVoiceById, inferResourceType, isVisibleForReleases, parseGeneration, releaseOf, toAvatarOption, toVoiceOption };
|
package/index.js
CHANGED
|
@@ -6937,7 +6937,11 @@ var ttsParamConfig = (promptMaxLength, withLanguage) => ({
|
|
|
6937
6937
|
...withLanguage ? params.language(false) : {},
|
|
6938
6938
|
...params.prompt({ maxLength: promptMaxLength }),
|
|
6939
6939
|
...params.voiceId([], DEFAULT_VOICE_ID, { catalog: VOICE_CATALOG }),
|
|
6940
|
-
...voiceSettingsParams(true)
|
|
6940
|
+
...voiceSettingsParams(true),
|
|
6941
|
+
// Timings come back beside the audio, for captions and lip sync. Off by
|
|
6942
|
+
// default: the vendor answers a different route that inlines the audio as
|
|
6943
|
+
// base64, and callers who do not need timings should not pay the decode.
|
|
6944
|
+
...p.boolean("withTimestamps", false, "Character Timings")
|
|
6941
6945
|
});
|
|
6942
6946
|
var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
6943
6947
|
// ── TTS ───────────────────────────────────────────────────────────
|
|
@@ -7063,6 +7067,56 @@ var { MODELS: MODELS24 } = defineModels("elevenlabs", [
|
|
|
7063
7067
|
...p.boolean("isInstrumental", false, "Instrumental Only")
|
|
7064
7068
|
}
|
|
7065
7069
|
},
|
|
7070
|
+
// ── Transcription ─────────────────────────────────────────────────
|
|
7071
|
+
{
|
|
7072
|
+
// `modelId` is the pricing-catalog key: the vendor id `scribe_v2` is not
|
|
7073
|
+
// vendor-scoped, so pricing carries the `eleven_` prefix, as music does.
|
|
7074
|
+
id: "eleven-speech-to-text",
|
|
7075
|
+
name: "Eleven Scribe v2",
|
|
7076
|
+
modelId: "eleven_scribe_v2",
|
|
7077
|
+
addedAt: "2026-09-24",
|
|
7078
|
+
workflow: "elevenlabs/v1/speech-to-text",
|
|
7079
|
+
estimatedTime: 10,
|
|
7080
|
+
mode: "text",
|
|
7081
|
+
inputType: "a2t",
|
|
7082
|
+
description: "Transcribe speech from audio or video, with word timings and speaker labels.",
|
|
7083
|
+
features: [feat("Transcription", "characteristic"), feat("Speaker Labels", "characteristic")],
|
|
7084
|
+
paramConfig: {
|
|
7085
|
+
...params.audioInput("Audio or Video", true),
|
|
7086
|
+
// ISO 639-1 or 639-3. Left free text: the vendor detects the language on
|
|
7087
|
+
// its own, and the closed list would be 99 entries of upkeep.
|
|
7088
|
+
language: {
|
|
7089
|
+
label: "Language (ISO code, optional)",
|
|
7090
|
+
descriptor: { kind: "text", placeholder: "e.g. en, rus \u2014 omit to auto-detect" }
|
|
7091
|
+
},
|
|
7092
|
+
...p.boolean("diarize", false, "Label Speakers"),
|
|
7093
|
+
...p.range("numSpeakers", 1, 32, 1, { step: 1, label: "Speakers" }),
|
|
7094
|
+
...p.enum("timestampsGranularity", ["word", "character"], "word", { label: "Timing Detail" }),
|
|
7095
|
+
...p.boolean("tagAudioEvents", false, "Tag Audio Events"),
|
|
7096
|
+
...params.seed(2147483647)
|
|
7097
|
+
}
|
|
7098
|
+
},
|
|
7099
|
+
// ── Video to Music ────────────────────────────────────────────────
|
|
7100
|
+
{
|
|
7101
|
+
// Same pricing model as music-generation — the same engine writes the
|
|
7102
|
+
// track; what separates the two is the use case, `video-to-audio`.
|
|
7103
|
+
id: "eleven-video-to-music",
|
|
7104
|
+
name: "Eleven Video to Music",
|
|
7105
|
+
modelId: "eleven_music_v2",
|
|
7106
|
+
addedAt: "2026-09-24",
|
|
7107
|
+
workflow: "elevenlabs/v1/video-to-music",
|
|
7108
|
+
estimatedTime: 25,
|
|
7109
|
+
mode: "audio",
|
|
7110
|
+
inputType: "v2a",
|
|
7111
|
+
description: "Score a video with a soundtrack written to follow what happens on screen.",
|
|
7112
|
+
features: [feat("Video Scoring", "characteristic"), feat("Soundtrack", "characteristic")],
|
|
7113
|
+
paramConfig: {
|
|
7114
|
+
// The vendor takes up to ten clips, 200MB and 600 seconds in total, and
|
|
7115
|
+
// scores them as one timeline.
|
|
7116
|
+
...params.videoInputs(10, "Videos", true),
|
|
7117
|
+
...params.prompt({ maxLength: 1e3, required: false, placeholder: "How the soundtrack should sound" })
|
|
7118
|
+
}
|
|
7119
|
+
},
|
|
7066
7120
|
// ── Speech-to-Speech ──────────────────────────────────────────────
|
|
7067
7121
|
{
|
|
7068
7122
|
id: "eleven-sts-v2",
|
|
@@ -7227,6 +7281,7 @@ var buildElevenLabsTTSPayload = (modelId) => (input) => ({
|
|
|
7227
7281
|
voice_id: input.voiceId ?? DEFAULT_VOICE_ID,
|
|
7228
7282
|
model_id: modelId,
|
|
7229
7283
|
...input.language ? { language_code: input.language } : {},
|
|
7284
|
+
...input.withTimestamps ? { with_timestamps: true } : {},
|
|
7230
7285
|
...voiceSettings(input)
|
|
7231
7286
|
});
|
|
7232
7287
|
var buildElevenLabsSTSPayload = (modelId) => (input) => ({
|
|
@@ -7246,13 +7301,30 @@ var buildElevenLabsDialoguePayload = (input) => ({
|
|
|
7246
7301
|
...input.language ? { language_code: input.language } : {},
|
|
7247
7302
|
...input.seed != null ? { seed: input.seed } : {}
|
|
7248
7303
|
});
|
|
7304
|
+
var buildElevenLabsTranscribePayload = (input) => ({
|
|
7305
|
+
audio_url: input.audioUrl,
|
|
7306
|
+
...input.language ? { language_code: input.language } : {},
|
|
7307
|
+
...input.diarize ? { diarize: true } : {},
|
|
7308
|
+
// Only meaningful alongside diarization, and only when the caller moved it
|
|
7309
|
+
// off the default of one.
|
|
7310
|
+
...input.diarize && input.numSpeakers && input.numSpeakers > 1 ? { num_speakers: input.numSpeakers } : {},
|
|
7311
|
+
...input.timestampsGranularity ? { timestamps_granularity: input.timestampsGranularity } : {},
|
|
7312
|
+
...input.tagAudioEvents ? { tag_audio_events: true } : {},
|
|
7313
|
+
...input.seed != null ? { seed: input.seed } : {}
|
|
7314
|
+
});
|
|
7315
|
+
var buildElevenLabsVideoToMusicPayload = (input) => ({
|
|
7316
|
+
video_urls: input.videoUrls,
|
|
7317
|
+
...input.prompt ? { description: input.prompt } : {}
|
|
7318
|
+
});
|
|
7249
7319
|
registerPayloads(MODELS24, {
|
|
7250
7320
|
"elevenlabs-music-v2": buildElevenLabsMusicPayload,
|
|
7251
7321
|
"eleven-v3": buildElevenLabsTTSPayload("eleven_v3"),
|
|
7252
7322
|
"eleven-multilingual-v2": buildElevenLabsTTSPayload("eleven_multilingual_v2"),
|
|
7253
7323
|
"eleven-sts-v2": buildElevenLabsSTSPayload("eleven_english_sts_v2"),
|
|
7254
7324
|
"eleven-multilingual-sts-v2": buildElevenLabsSTSPayload("eleven_multilingual_sts_v2"),
|
|
7255
|
-
"eleven-text-to-dialogue": buildElevenLabsDialoguePayload
|
|
7325
|
+
"eleven-text-to-dialogue": buildElevenLabsDialoguePayload,
|
|
7326
|
+
"eleven-speech-to-text": buildElevenLabsTranscribePayload,
|
|
7327
|
+
"eleven-video-to-music": buildElevenLabsVideoToMusicPayload
|
|
7256
7328
|
});
|
|
7257
7329
|
|
|
7258
7330
|
// src/vendors/catalog/heygen.ts
|
|
@@ -11588,6 +11660,8 @@ var MAX_DRIVE_PROMPT_LENGTH = 18e3;
|
|
|
11588
11660
|
|
|
11589
11661
|
// src/client/drive.ts
|
|
11590
11662
|
var USER_REACTION_ATTR = "userReaction";
|
|
11663
|
+
var DRAFT_TASK_ATTR = "draft_task";
|
|
11664
|
+
var DRAFT_EXPIRES_AT_ATTR = "draft_expires_at";
|
|
11591
11665
|
function inferResourceType(mode) {
|
|
11592
11666
|
if (mode === "video") return "VIDEO";
|
|
11593
11667
|
if (mode === "audio") return "AUDIO";
|
|
@@ -11634,6 +11708,14 @@ function parseAttributes(raw) {
|
|
|
11634
11708
|
}
|
|
11635
11709
|
return map;
|
|
11636
11710
|
}
|
|
11711
|
+
function parseDraftInfo(attrs) {
|
|
11712
|
+
const draftTask = parseJsonAttr(attrs[DRAFT_TASK_ATTR]);
|
|
11713
|
+
if (!isSeedanceDraftTask(draftTask)) return {};
|
|
11714
|
+
return {
|
|
11715
|
+
draftTask: { id: draftTask.id, video_input: draftTask.video_input, signature: draftTask.signature },
|
|
11716
|
+
...attrs[DRAFT_EXPIRES_AT_ATTR] ? { draftExpiresAt: attrs[DRAFT_EXPIRES_AT_ATTR] } : {}
|
|
11717
|
+
};
|
|
11718
|
+
}
|
|
11637
11719
|
function parseReaction(value) {
|
|
11638
11720
|
return value === "like" || value === "dislike" ? value : void 0;
|
|
11639
11721
|
}
|
|
@@ -11706,7 +11788,8 @@ function toDetailedItem(file) {
|
|
|
11706
11788
|
referenceAudioUrl: extras.referenceAudioUrl,
|
|
11707
11789
|
aspectRatio: extras.aspectRatio,
|
|
11708
11790
|
resolution: extras.resolution,
|
|
11709
|
-
quality: extras.quality
|
|
11791
|
+
quality: extras.quality,
|
|
11792
|
+
...parseDraftInfo(attrs)
|
|
11710
11793
|
};
|
|
11711
11794
|
}
|
|
11712
11795
|
var LEGACY_TOOL_APP = {
|
|
@@ -11751,7 +11834,8 @@ function adaptLegacyGeneration(attrs) {
|
|
|
11751
11834
|
appType: app?.appType,
|
|
11752
11835
|
model: attrs.model || void 0,
|
|
11753
11836
|
aiSDKPayload,
|
|
11754
|
-
userReaction: parseReaction(attrs[USER_REACTION_ATTR])
|
|
11837
|
+
userReaction: parseReaction(attrs[USER_REACTION_ATTR]),
|
|
11838
|
+
...parseDraftInfo(attrs)
|
|
11755
11839
|
};
|
|
11756
11840
|
}
|
|
11757
11841
|
function parseGeneration(file) {
|
|
@@ -11764,7 +11848,8 @@ function parseGeneration(file) {
|
|
|
11764
11848
|
appType: attrs.appType === "native" || attrs.appType === "miniapp" ? attrs.appType : void 0,
|
|
11765
11849
|
model: attrs.model || void 0,
|
|
11766
11850
|
aiSDKPayload: parseJsonAttr(attrs.aiSDKPayload),
|
|
11767
|
-
userReaction: parseReaction(attrs[USER_REACTION_ATTR])
|
|
11851
|
+
userReaction: parseReaction(attrs[USER_REACTION_ATTR]),
|
|
11852
|
+
...parseDraftInfo(attrs)
|
|
11768
11853
|
};
|
|
11769
11854
|
}
|
|
11770
11855
|
function createDriveClient(f, apiUrl, rootFolderName) {
|
|
@@ -12574,9 +12659,11 @@ var ElevenAudioIsolation = "eleven-audio-isolation";
|
|
|
12574
12659
|
var ElevenDubbing = "eleven-dubbing";
|
|
12575
12660
|
var ElevenMultilingualStsV2 = "eleven-multilingual-sts-v2";
|
|
12576
12661
|
var ElevenMultilingualV2 = "eleven-multilingual-v2";
|
|
12662
|
+
var ElevenSpeechToText = "eleven-speech-to-text";
|
|
12577
12663
|
var ElevenStsV2 = "eleven-sts-v2";
|
|
12578
12664
|
var ElevenTextToDialogue = "eleven-text-to-dialogue";
|
|
12579
12665
|
var ElevenV3 = "eleven-v3";
|
|
12666
|
+
var ElevenVideoToMusic = "eleven-video-to-music";
|
|
12580
12667
|
var ElevenVoiceCreate = "eleven-voice-create";
|
|
12581
12668
|
var ElevenVoiceDesignV2 = "eleven-voice-design-v2";
|
|
12582
12669
|
var ElevenVoiceDesignV3 = "eleven-voice-design-v3";
|
|
@@ -12819,9 +12906,11 @@ var Models = {
|
|
|
12819
12906
|
ElevenDubbing,
|
|
12820
12907
|
ElevenMultilingualStsV2,
|
|
12821
12908
|
ElevenMultilingualV2,
|
|
12909
|
+
ElevenSpeechToText,
|
|
12822
12910
|
ElevenStsV2,
|
|
12823
12911
|
ElevenTextToDialogue,
|
|
12824
12912
|
ElevenV3,
|
|
12913
|
+
ElevenVideoToMusic,
|
|
12825
12914
|
ElevenVoiceCreate,
|
|
12826
12915
|
ElevenVoiceDesignV2,
|
|
12827
12916
|
ElevenVoiceDesignV3,
|