Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Audio: voice picker, cloning, dialogue, voice change, translate & dub

Claude5e999079ca5d
diff --git a/scripts/gen-cloud-models.py b/scripts/gen-cloud-models.py
index c39e9677..0d119687 100644
--- a/scripts/gen-cloud-models.py
+++ b/scripts/gen-cloud-models.py
@@ -106,6 +106,10 @@ model("flux-kontext-max", "FLUX.1 Kontext [max]", "Black Forest Labs", "flux", "
model("ideogram-4-5", "Ideogram 4.5", "Ideogram", "ideogram", "image",
"Best-in-class typography, posters and graphic design",
[("t2i", "ideogram/v4.5"), ("edit", "ideogram/v4.5/edit")], defaults={"aspectRatio": "1:1"})
+model("flux-fill-pro", "FLUX.1 Fill [pro]", "Black Forest Labs", "flux", "image", "Precise inpainting and object replacement with a mask",
+ [("inpaint", "fal-ai/flux-pro/v1/fill")], pricing=("megapixel", 0.05), hidden=False)
+model("z-image-inpaint", "Z-Image Turbo Inpaint (hosted)", "Alibaba Tongyi", "z-image", "image", "Cheapest, fastest masked inpainting",
+ [("inpaint", "fal-ai/z-image/turbo/inpaint")], badges=["fast"], pricing=("megapixel", 0.01))
model("recraft-4-1", "Recraft V4.1", "Recraft", "recraft", "image",
"Brand-ready illustration, icons and design assets",
[("t2i", "fal-ai/recraft/v4.1/text-to-image")], defaults={"aspectRatio": "1:1"})
@@ -276,8 +280,30 @@ model("seedvr-video", "SeedVR2 Video Upscale", "ByteDance Seed", "seedvr", "vide
[("upscale-video", "fal-ai/seedvr/upscale/video")])
model("birefnet-cloud", "BiRefNet background removal", "ZhengPeng7", "birefnet", "image", "Clean cut-outs with hair detail",
[("bg-remove", "fal-ai/birefnet/v2")], pricing=("image", 0.0), fixed={"operating_resolution": "2048x2048", "output_format": "png"})
-model("elevenlabs-tts", "ElevenLabs v3", "ElevenLabs", "elevenlabs", "audio", "Expressive multilingual speech",
- [("tts", "fal-ai/elevenlabs/tts/eleven-v3")], pricing=("request", 0.1, "per 1k chars"), fixed={"voice": "Rachel"})
+model("elevenlabs-tts", "ElevenLabs v3", "ElevenLabs", "elevenlabs", "audio", "Most expressive speech — audio tags like [whispers] and [laughs]",
+ [("tts", "fal-ai/elevenlabs/tts/eleven-v3")], badges=["top"], pricing=("request", 0.1, "per 1k chars"), defaults={"voice": "JBFqnCBsd6RMkjVDRZzb"})
+model("elevenlabs-v4", "ElevenLabs v4", "ElevenLabs", "elevenlabs", "audio", "Newest ElevenLabs voice model — natural, stable long-form",
+ [("tts", "elevenlabs/tts/eleven-v4")], badges=["new"], pricing=("request", 0.08, "per 1k chars"), defaults={"voice": "JBFqnCBsd6RMkjVDRZzb"})
+model("elevenlabs-v4-turbo", "ElevenLabs v4 Turbo", "ElevenLabs", "elevenlabs", "audio", "Low-latency v4 at half the price",
+ [("tts", "elevenlabs/tts/eleven-v4-turbo")], badges=["fast"], pricing=("request", 0.04, "per 1k chars"), defaults={"voice": "JBFqnCBsd6RMkjVDRZzb"})
+model("elevenlabs-multilingual-v2", "ElevenLabs Multilingual v2", "ElevenLabs", "elevenlabs", "audio", "29 languages with speed and style control",
+ [("tts", "fal-ai/elevenlabs/tts/multilingual-v2")], pricing=("request", 0.1, "per 1k chars"), defaults={"voice": "JBFqnCBsd6RMkjVDRZzb"})
+model("elevenlabs-dialogue", "ElevenLabs Dialogue", "ElevenLabs", "elevenlabs", "audio", "Several speakers, one natural conversation",
+ [("dialogue", "fal-ai/elevenlabs/text-to-dialogue/eleven-v3")], badges=["new"], pricing=("request", 0.1, "per 1k chars"), defaults={"voice": "JBFqnCBsd6RMkjVDRZzb"})
+model("chatterbox-cloud", "Chatterbox (hosted)", "Resemble AI", "chatterbox", "audio", "Clone any voice from a 10-second sample",
+ [("tts", "fal-ai/chatterbox/text-to-speech")], pricing=("request", 0.025, "per 1k chars"))
+model("index-tts-2-cloud", "IndexTTS-2 (hosted)", "Bilibili", "index-tts", "audio", "Zero-shot cloning with emotion control",
+ [("tts", "fal-ai/index-tts-2/text-to-speech")], pricing=("second", 0.002))
+model("elevenlabs-voice-changer", "ElevenLabs Voice Changer", "ElevenLabs", "elevenlabs", "audio", "Re-voice a recording with any premade voice",
+ [("voice-change", "fal-ai/elevenlabs/voice-changer")], pricing=("minute", 0.3), defaults={"voice": "JBFqnCBsd6RMkjVDRZzb"})
+model("chatterbox-vc-cloud", "Chatterbox Voice Conversion (hosted)", "Resemble AI", "chatterbox", "audio", "Turn a recording into any voice from a sample",
+ [("voice-change", "fal-ai/chatterbox/speech-to-speech")], pricing=("minute", 0.015))
+model("heygen-translate", "HeyGen Translate", "HeyGen", "heygen", "video", "Lip-synced video translation into 170+ languages and accents",
+ [("dub", "fal-ai/heygen/v2/translate/precision")], badges=["top"], pricing=("second", 0.1))
+model("heygen-translate-fast", "HeyGen Translate Speed", "HeyGen", "heygen", "video", "Faster, cheaper lip-synced translation",
+ [("dub", "fal-ai/heygen/v2/translate/speed")], badges=["fast"], pricing=("second", 0.05))
+model("elevenlabs-dubbing", "ElevenLabs Dubbing", "ElevenLabs", "elevenlabs", "video", "Dub video or audio while keeping each speaker's voice",
+ [("dub", "fal-ai/elevenlabs/dubbing")], pricing=("minute", 0.6))
model("elevenlabs-sfx", "ElevenLabs Sound Effects", "ElevenLabs", "elevenlabs", "audio", "Describe a sound, get a sound",
[("sfx", "fal-ai/elevenlabs/sound-effects/v2")], pricing=("second", 0.002), defaults={"duration": 5}, options={"durations": [2, 5, 10, 22]})
model("elevenlabs-music", "ElevenLabs Music", "ElevenLabs", "elevenlabs", "audio", "Studio-quality songs from a prompt",
@@ -288,6 +314,24 @@ model("mmaudio-cloud", "MMAudio", "hkchengrex", "mmaudio", "video", "Add matchin
# ---------------------------------------------------------------------------
+# Numeric voice settings exposed as sliders.
+SLIDER_LABELS = {
+ "stability": "Stability", "similarity_boost": "Similarity", "style": "Style exaggeration", "speed": "Speed",
+ "exaggeration": "Emotion", "cfg": "Pace / guidance", "temperature": "Variety", "strength": "Voice strength",
+}
+
+# ElevenLabs premade voices (docs/research/paid-model-apis-2.json → elevenlabsVoices). Sent by voice_id.
+_EL = RESEARCH_2.get("elevenlabsVoices") or {}
+ELEVEN_VOICES = [
+ {"id": v["voice_id"], "name": v["name"], "hint": " · ".join(x for x in [(v.get("label") or "").partition(" - ")[2], v.get("accent")] if x)}
+ for v in (_EL.get("voices") or [])
+]
+
+# ElevenLabs dubbing takes ISO 639-1 codes.
+ISO_LANGUAGES = ["en", "es", "fr", "de", "it", "pt", "pl", "hi", "ja", "ko", "zh", "ar", "ru", "tr", "nl", "sv", "id", "fil", "uk", "el", "cs",
+ "ro", "da", "fi", "bg", "hr", "sk", "ms", "ta", "vi", "hu", "no"]
+
+
def warn(msg):
print(f"warning: {msg}", file=sys.stderr)
@@ -325,6 +369,29 @@ def build_route(op, ep, provider, m, opts, ropts=None):
fmap["prompt"] = kf["prompt"]
else:
fmap["prompt"] = False
+ # Zero-shot TTS takes its reference voice in the "audio" field; voice conversion names it separately.
+ if op == "tts" and "audio" in kf:
+ kf["referenceVoice"] = kf.pop("audio")
+ if "referenceVoice" in kf and (inputs.get(kf["referenceVoice"]) or {}).get("type") != "array":
+ fmap["voiceAudio"] = kf["referenceVoice"]
+ opts["voiceClone"] = True
+ if "voice" in kf and "[]" not in kf["voice"]:
+ fmap["voice"] = kf["voice"]
+ if "voice" in kf and "elevenlabs" in ep:
+ opts["voices"] = ELEVEN_VOICES
+ if "dialogue" in kf:
+ fmap["dialogue"] = {"key": kf["dialogue"], "text": "text", "voice": "voice"}
+ if "targetLanguage" in kf:
+ fmap["targetLanguage"] = kf["targetLanguage"]
+ enum = (inputs.get(kf["targetLanguage"]) or {}).get("values")
+ opts["languages"] = enum or ISO_LANGUAGES
+ sliders = [
+ {"param": k, "label": SLIDER_LABELS[k], "min": v["minimum"], "max": v["maximum"], "step": 0.05 if v["maximum"] - v["minimum"] <= 4 else 1,
+ "default": v.get("default", v["minimum"])}
+ for k, v in inputs.items() if k in SLIDER_LABELS and isinstance(v, dict) and "minimum" in v and "maximum" in v
+ ]
+ if sliders:
+ opts["sliders"] = sliders
# Some APIs call their boolean sound switch "audio" (Wan 3.0); that's generateAudio, not an audio file.
if "audio" in kf and (inputs.get(kf["audio"]) or {}).get("type") == "boolean":
kf.setdefault("generateAudio", kf.pop("audio"))
diff --git a/src/app/api/elements/route.ts b/src/app/api/elements/route.ts
index 1dbf5c9c..b9ae7249 100644
--- a/src/app/api/elements/route.ts
+++ b/src/app/api/elements/route.ts
@@ -2,7 +2,7 @@ import { connection } from "next/server";
import { z } from "zod";
import { createElement, listElements } from "@/server/elements";
-const Kind = z.enum(["character", "location", "prop", "style"]);
+const Kind = z.enum(["character", "location", "prop", "style", "voice"]);
const Body = z.object({
name: z.string().trim().min(1).max(60),
diff --git a/src/app/api/generations/route.ts b/src/app/api/generations/route.ts
index 091bb407..431c0a8d 100644
--- a/src/app/api/generations/route.ts
+++ b/src/app/api/generations/route.ts
@@ -17,6 +17,7 @@ const RequestSchema = z.object({
sketch: z.string().optional(),
video: z.string().optional(),
audio: z.string().optional(),
+ voiceAudio: z.string().optional(),
})
.optional(),
params: z
@@ -32,6 +33,9 @@ const RequestSchema = z.object({
multiShot: z.literal("auto").optional(),
draft: z.boolean().optional(),
draftId: z.string().max(8192).optional(),
+ voice: z.string().max(200).optional(),
+ dialogue: z.array(z.object({ text: z.string().max(5000), voice: z.string().max(200).optional() })).max(200).optional(),
+ targetLanguage: z.string().max(80).optional(),
extra: z.record(z.string(), z.unknown()).optional(),
})
.optional(),
diff --git a/src/components/elements-view.tsx b/src/components/elements-view.tsx
index d8677d03..1d2328f7 100644
--- a/src/components/elements-view.tsx
+++ b/src/components/elements-view.tsx
@@ -1,6 +1,6 @@
"use client";
-import { AtSign, Check, Copy, Loader2, Pencil, Plus, Trash2, X } from "lucide-react";
+import { AtSign, AudioLines, Check, Copy, Loader2, Pencil, Plus, Trash2, X } from "lucide-react";
import Link from "next/link";
import { useRouter, useSearchParams } from "next/navigation";
import { Suspense, useMemo, useState } from "react";
@@ -16,6 +16,7 @@ import { Skeleton } from "@/components/ui/skeleton";
import { StudioPage } from "@/components/studio/studio-page";
import { fileToSlot, MediaSlot, type SlotValue } from "@/components/studio/media-slot";
import { ELEMENT_ICONS } from "@/components/studio/prompt-input";
+import { VoiceRecorder } from "@/components/studio/voice-recorder";
import type { StudioConfig } from "@/components/studio/studio-context";
import { useDeleteElement, useElement, useElements, useSaveElement } from "@/lib/api";
import { ELEMENT_KINDS, elementKindInfo, handleFor, type ElementKind, type StudioElement } from "@/lib/catalog/elements";
@@ -26,6 +27,7 @@ const TIPS: Record<ElementKind, string> = {
location: "1–6 photos of the place from a few viewpoints.",
prop: "1–4 clean photos of the object, ideally on a plain background.",
style: "2–10 images that share the look you want: palette, lighting, grain, mood.",
+ voice: "One clean 10–60 second recording of the voice — just speech, no music. Record it here or upload a WAV or MP3.",
};
const MAX_PHOTOS = 20;
@@ -131,7 +133,7 @@ function ElementForm({ onOpenChange, element, defaultKind = "character", onSaved
<DialogDescription>Save it once, then type @ in any image or video prompt to put it in the shot.</DialogDescription>
</DialogHeader>
{!element && (
- <div className="grid grid-cols-4 gap-1 rounded-xl bg-muted p-1">
+ <div className="grid grid-cols-5 gap-1 rounded-xl bg-muted p-1">
{ELEMENT_KINDS.map((k) => {
const Icon = ELEMENT_ICONS[k.kind];
return (
@@ -179,7 +181,11 @@ function ElementForm({ onOpenChange, element, defaultKind = "character", onSaved
/>
<div className="space-y-2">
<p className="text-[12px] text-muted-foreground">{TIPS[kind]}</p>
- <PhotoGrid photos={photos} setPhotos={setPhotos} />
+ {kind === "voice" ? (
+ <VoiceSample value={photos[0]} onChange={(v) => setPhotos(v ? [{ ...v, id: nanoid(6) }] : [])} />
+ ) : (
+ <PhotoGrid photos={photos} setPhotos={setPhotos} />
+ )}
</div>
<DialogFooter>
<Button disabled={!canSave} onClick={submit}>
@@ -190,6 +196,23 @@ function ElementForm({ onOpenChange, element, defaultKind = "character", onSaved
);
}
+/** One voice recording: record it here or upload a file, then listen back. */
+function VoiceSample({ value, onChange }: { value?: SlotValue; onChange: (v: SlotValue | null) => void }) {
+ return value?.ref ? (
+ <div className="flex items-center gap-2 rounded-xl border bg-muted/40 p-2">
+ <audio src={value.preview} controls className="h-9 flex-1" />
+ <Button variant="ghost" size="icon" onClick={() => onChange(null)} aria-label="Remove recording">
+ <X />
+ </Button>
+ </div>
+ ) : (
+ <div className="flex items-center gap-2">
+ <VoiceRecorder onRecorded={onChange} />
+ <MediaSlot label="Upload" kind="audio" value={null} onChange={(v) => v && !v.uploading && onChange(v)} />
+ </div>
+ );
+}
+
function HandleCopy({ handle }: { handle: string }) {
const [done, setDone] = useState(false);
return (
@@ -213,30 +236,37 @@ function ElementCard({ el }: { el: StudioElement }) {
const Icon = ELEMENT_ICONS[el.kind];
return (
<div className="group relative overflow-hidden rounded-xl border bg-background transition-shadow hover:shadow-normal">
- <Link href={`/elements/${el.id}`} className="block">
- <div className="grid aspect-square grid-cols-2 grid-rows-2 gap-0.5 bg-muted">
- {el.references.length ? (
- el.references.slice(0, 4).map((r, i, arr) => (
- // eslint-disable-next-line @next/next/no-img-element
- <img
- key={r}
- src={r}
- alt=""
- className={cn(
- "size-full object-cover",
- arr.length === 1 && "col-span-2 row-span-2",
- arr.length === 2 && "row-span-2",
- arr.length === 3 && i === 0 && "row-span-2",
- )}
- />
- ))
- ) : (
- <div className="col-span-2 row-span-2 grid place-items-center text-muted-foreground">
- <Icon className="size-8" />
- </div>
- )}
+ {el.kind === "voice" ? (
+ <div className="grid aspect-square place-items-center bg-gradient-to-br from-brand-faint to-muted p-4">
+ <AudioLines className="size-10 text-brand-text" />
+ {el.references[0] && <audio src={el.references[0]} controls className="w-full" />}
</div>
- </Link>
+ ) : (
+ <Link href={`/elements/${el.id}`} className="block">
+ <div className="grid aspect-square grid-cols-2 grid-rows-2 gap-0.5 bg-muted">
+ {el.references.length ? (
+ el.references.slice(0, 4).map((r, i, arr) => (
+ // eslint-disable-next-line @next/next/no-img-element
+ <img
+ key={r}
+ src={r}
+ alt=""
+ className={cn(
+ "size-full object-cover",
+ arr.length === 1 && "col-span-2 row-span-2",
+ arr.length === 2 && "row-span-2",
+ arr.length === 3 && i === 0 && "row-span-2",
+ )}
+ />
+ ))
+ ) : (
+ <div className="col-span-2 row-span-2 grid place-items-center text-muted-foreground">
+ <Icon className="size-8" />
+ </div>
+ )}
+ </div>
+ </Link>
+ )}
<div className="flex items-start justify-between gap-2 p-3">
<div className="min-w-0">
<p className="truncate font-medium">{el.name}</p>
diff --git a/src/components/studio/audio-controls.tsx b/src/components/studio/audio-controls.tsx
new file mode 100644
index 00000000..5631db8d
--- /dev/null
+++ b/src/components/studio/audio-controls.tsx
@@ -0,0 +1,304 @@
+"use client";
+
+import { AudioLines, Check, Globe, Minus, Plus, SlidersHorizontal, Upload, User, X } from "lucide-react";
+import Link from "next/link";
+import { useMemo, useRef, useState } from "react";
+import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
+import { Slider } from "@/components/ui/slider";
+import { useElements } from "@/lib/api";
+import type { GenParams, ModelDef } from "@/lib/catalog/types";
+import { cn } from "@/lib/utils";
+import { fileToSlot, type SlotValue } from "./media-slot";
+import { VoiceRecorder } from "./voice-recorder";
+
+const chip = "inline-flex h-8 shrink-0 items-center gap-1.5 rounded-full px-3 text-[13px] font-medium transition-colors";
+const idle = "bg-secondary text-secondary-foreground hover:bg-accent";
+const on = "bg-brand-faint text-brand-text hover:bg-brand-faint-hover";
+
+export type VoiceChoice = { kind: "preset"; id: string } | { kind: "sample"; value: SlotValue };
+
+function Section({ title, children }: { title: string; children: React.ReactNode }) {
+ return (
+ <div>
+ <p className="px-2 pt-2 pb-1 text-[11px] font-medium tracking-wide text-muted-foreground uppercase">{title}</p>
+ {children}
+ </div>
+ );
+}
+
+function Row({ active, onClick, icon, name, hint }: { active: boolean; onClick: () => void; icon: React.ReactNode; name: string; hint?: string }) {
+ return (
+ <button onClick={onClick} className={cn("flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left hover:bg-accent", active && "bg-brand-faint")}>
+ <span className="grid size-7 shrink-0 place-items-center rounded-full bg-muted text-muted-foreground">{icon}</span>
+ <span className="min-w-0 flex-1">
+ <span className={cn("block truncate text-[13px] font-medium", active && "text-brand-text")}>{name}</span>
+ {hint && <span className="block truncate text-[11px] text-muted-foreground">{hint}</span>}
+ </span>
+ {active && <Check className="size-3.5 text-brand-text" />}
+ </button>
+ );
+}
+
+/**
+ * Pick a premade voice (ElevenLabs), one of your saved voices, or a fresh sample to clone
+ * (record or upload) — whatever the model accepts.
+ */
+export function VoicePicker({
+ model,
+ voice,
+ sample,
+ onChange,
+ label = "Voice",
+}: {
+ model: ModelDef;
+ voice?: string;
+ sample?: SlotValue | null;
+ onChange: (c: VoiceChoice | null) => void;
+ label?: string;
+}) {
+ const [open, setOpen] = useState(false);
+ const [q, setQ] = useState("");
+ const file = useRef<HTMLInputElement>(null);
+ const saved = (useElements().data ?? []).filter((e) => e.kind === "voice" && e.references[0]);
+ const presets = model.options.voices ?? [];
+ const clone = !!model.options.voiceClone;
+ const preset = presets.find((v) => v.id === voice || v.name === voice);
+ const current = sample?.ref ? (saved.find((e) => e.references[0] === sample.ref)?.name ?? sample.name ?? "Your sample") : preset?.name;
+ const list = presets.filter((v) => !q || `${v.name} ${v.hint ?? ""}`.toLowerCase().includes(q.toLowerCase()));
+ const pick = (c: VoiceChoice) => {
+ onChange(c);
+ setOpen(false);
+ };
+ return (
+ <Popover open={open} onOpenChange={setOpen}>
+ <PopoverTrigger asChild>
+ <button type="button" className={cn(chip, current ? on : idle)}>
+ <User className="size-3.5" />
+ {current ?? (clone ? `${label}: add a sample` : label)}
+ </button>
+ </PopoverTrigger>
+ <PopoverContent className="w-[min(92vw,340px)] p-1.5" align="start" side="top" collisionPadding={12}>
+ {clone && (
+ <Section title="Clone a voice">
+ <div className="flex flex-wrap gap-1.5 px-2 pb-1">
+ <VoiceRecorder onRecorded={(v) => pick({ kind: "sample", value: v })} />
+ <button type="button" onClick={() => file.current?.click()} className={cn(chip, idle)}>
+ <Upload className="size-3.5" /> Upload
+ </button>
+ <input
+ ref={file}
+ type="file"
+ accept="audio/*"
+ hidden
+ onChange={(e) => {
+ const f = e.target.files?.[0];
+ if (f) void fileToSlot(f, (v) => v && !v.uploading && pick({ kind: "sample", value: v }), "audio");
+ e.target.value = "";
+ }}
+ />
+ </div>
+ <p className="px-2 pb-1 text-[11px] text-muted-foreground">10–60 s of clean speech works best.</p>
+ </Section>
+ )}
+ {clone && (
+ <Section title="My voices">
+ {saved.length ? (
+ saved.map((e) => (
+ <Row
+ key={e.id}
+ active={sample?.ref === e.references[0]}
+ onClick={() => pick({ kind: "sample", value: { ref: e.references[0], preview: e.references[0], kind: "audio", name: e.name } })}
+ icon={<AudioLines className="size-3.5" />}
+ name={e.name}
+ hint={e.description ?? "Saved voice"}
+ />
+ ))
+ ) : (
+ <p className="px-2 pb-1 text-[12px] text-muted-foreground">
+ Save voices you reuse in{" "}
+ <Link href="/elements?new=1" className="text-brand-text hover:underline">
+ Elements
+ </Link>
+ .
+ </p>
+ )}
+ </Section>
+ )}
+ {presets.length > 0 && (
+ <Section title="Voices">
+ {presets.length > 8 && (
+ <input
+ value={q}
+ onChange={(e) => setQ(e.target.value)}
+ placeholder="Search voices"
+ className="mx-2 mb-1 h-8 w-[calc(100%-1rem)] rounded-md border bg-background px-2 text-sm outline-none focus:border-primary"
+ />
+ )}
+ <div className="max-h-64 overflow-y-auto">
+ {list.map((v) => (
+ <Row
+ key={v.id}
+ active={preset?.id === v.id && !sample?.ref}
+ onClick={() => pick({ kind: "preset", id: v.id })}
+ icon={<User className="size-3.5" />}
+ name={v.name}
+ hint={v.hint}
+ />
+ ))}
+ </div>
+ </Section>
+ )}
+ {!clone && !presets.length && <p className="p-3 text-[13px] text-muted-foreground">{model.name} uses its own voice.</p>}
+ </PopoverContent>
+ </Popover>
+ );
+}
+
+/** Numeric voice settings (stability, similarity, speed…), sent as-is. */
+export function SlidersChip({ model, values, onChange }: { model: ModelDef; values: Record<string, unknown>; onChange: (param: string, v?: number) => void }) {
+ const sliders = model.options.sliders ?? [];
+ const changed = sliders.filter((s) => typeof values[s.param] === "number" && values[s.param] !== s.default).length;
+ return (
+ <Popover>
+ <PopoverTrigger asChild>
+ <button type="button" className={cn(chip, changed ? on : idle)}>
+ <SlidersHorizontal className="size-3.5" /> {changed ? `Settings · ${changed}` : "Settings"}
+ </button>
+ </PopoverTrigger>
+ <PopoverContent className="w-72 space-y-4 p-3" align="start" side="top">
+ {sliders.map((s) => {
+ const v = typeof values[s.param] === "number" ? (values[s.param] as number) : s.default;
+ return (
+ <div key={s.param} className="space-y-2">
+ <div className="flex justify-between text-[13px]">
+ <span>{s.label}</span>
+ <button
+ className="font-mono text-[12px] text-muted-foreground"
+ onDoubleClick={() => onChange(s.param, undefined)}
+ title="Double-click to reset"
+ >
+ {Number(v.toFixed(2))}
+ </button>
+ </div>
+ <Slider value={[v]} min={s.min} max={s.max} step={s.step} onValueChange={([x]) => onChange(s.param, x)} />
+ </div>
+ );
+ })}
+ </PopoverContent>
+ </Popover>
+ );
+}
+
+const display = (() => {
+ try {
+ return new Intl.DisplayNames(["en"], { type: "language" });
+ } catch {
+ return null;
+ }
+})();
+const langLabel = (l: string) => (/^[a-z]{2,3}$/.test(l) ? (display?.of(l) ?? l) : l);
+
+/** Target language for dubbing / translation. */
+export function LanguageChip({ languages, value, onChange }: { languages: string[]; value?: string; onChange: (v: string) => void }) {
+ const [open, setOpen] = useState(false);
+ const [q, setQ] = useState("");
+ const list = useMemo(() => languages.filter((l) => !q || langLabel(l).toLowerCase().includes(q.toLowerCase())), [languages, q]);
+ return (
+ <Popover open={open} onOpenChange={setOpen}>
+ <PopoverTrigger asChild>
+ <button type="button" className={cn(chip, value ? on : idle)}>
+ <Globe className="size-3.5" /> {value ? langLabel(value) : "Translate to…"}
+ </button>
+ </PopoverTrigger>
+ <PopoverContent className="w-72 p-1.5" align="start" side="top" collisionPadding={12}>
+ <input
+ autoFocus
+ value={q}
+ onChange={(e) => setQ(e.target.value)}
+ placeholder="Search languages"
+ className="mb-1 h-8 w-full rounded-md border bg-background px-2 text-sm outline-none focus:border-primary"
+ />
+ <div className="max-h-72 overflow-y-auto">
+ {list.map((l) => (
+ <button
+ key={l}
+ onClick={() => {
+ onChange(l);
+ setOpen(false);
+ }}
+ className={cn(
+ "flex w-full items-center justify-between rounded-md px-2 py-1.5 text-left text-[13px] hover:bg-accent",
+ value === l && "bg-brand-faint text-brand-text",
+ )}
+ >
+ {langLabel(l)}
+ {value === l && <Check className="size-3.5" />}
+ </button>
+ ))}
+ </div>
+ </PopoverContent>
+ </Popover>
+ );
+}
+
+type Line = NonNullable<GenParams["dialogue"]>[number];
+
+/** Script with one voice per line (ElevenLabs Dialogue). */
+export function DialogueEditor({ model, lines, onChange }: { model: ModelDef; lines: Line[]; onChange: (l: Line[]) => void }) {
+ const voices = model.options.voices ?? [];
+ const set = (i: number, patch: Partial<Line>) => onChange(lines.map((l, j) => (j === i ? { ...l, ...patch } : l)));
+ const chars = lines.reduce((n, l) => n + l.text.length, 0);
+ return (
+ <div className="space-y-1.5 px-1.5 pt-1 pb-2">
+ {lines.map((l, i) => (
+ <div key={i} className="flex items-start gap-2 rounded-xl border bg-muted/40 p-1.5">
+ <select
+ value={l.voice ?? ""}
+ onChange={(e) => set(i, { voice: e.target.value })}
+ className="h-8 w-32 shrink-0 rounded-lg border bg-background px-2 text-[13px] font-medium outline-none focus:border-primary"
+ aria-label={`Voice for line ${i + 1}`}
+ >
+ {voices.map((v) => (
+ <option key={v.id} value={v.id}>
+ {v.name}
+ </option>
+ ))}
+ </select>
+ <textarea
+ value={l.text}
+ onChange={(e) => set(i, { text: e.target.value })}
+ rows={1}
+ placeholder={i % 2 ? "…and the reply. Try audio tags like [laughs] or [whispers]" : "What does the first speaker say?"}
+ className="field-sizing-content max-h-32 min-h-8 flex-1 resize-none bg-transparent py-1 text-[14px] leading-snug outline-none placeholder:text-subtle-foreground"
+ />
+ <button
+ onClick={() => onChange(lines.filter((_, j) => j !== i))}
+ disabled={lines.length <= 1}
+ className="grid size-7 shrink-0 place-items-center rounded-full text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-30"
+ aria-label={`Remove line ${i + 1}`}
+ >
+ <X className="size-3.5" />
+ </button>
+ </div>
+ ))}
+ <div className="flex items-center px-1">
+ <button
+ // New lines alternate between the last two speakers.
+ onClick={() => onChange([...lines, { text: "", voice: lines.at(-2)?.voice ?? voices[0]?.id }])}
+ className="inline-flex items-center gap-1 text-[12px] font-medium text-brand-text hover:underline"
+ >
+ <Plus className="size-3" /> Add line
+ </button>
+ {lines.length > 1 && (
+ <button
+ onClick={() => onChange(lines.slice(0, -1))}
+ className="ml-3 inline-flex items-center gap-1 text-[12px] text-muted-foreground hover:text-foreground"
+ >
+ <Minus className="size-3" /> Last line
+ </button>
+ )}
+ <span className="ml-auto font-mono text-[11px] text-muted-foreground">{chars} chars</span>
+ </div>
+ </div>
+ );
+}
diff --git a/src/components/studio/composer.tsx b/src/components/studio/composer.tsx
index 130a8ae1..4d52383b 100644
--- a/src/components/studio/composer.tsx
+++ b/src/components/studio/composer.tsx
@@ -39,11 +39,24 @@ import { ModelPicker } from "./model-picker";
import { ELEMENT_ICONS, PromptInput, type PromptInputHandle } from "./prompt-input";
import { SketchTools } from "./sketch-tools";
import { MultiShotChip, ShotsEditor } from "./shots-editor";
+import { DialogueEditor, LanguageChip, SlidersChip, VoicePicker } from "./audio-controls";
import { useStudio } from "./studio-context";
import { nanoid } from "nanoid";
const EMPTY: StudioElement[] = [];
+/** Operations that transform one input into one result — no batch count. */
+const SINGLE_TAKE = new Set<Operation | undefined>(["lipsync", "avatar", "upscale-video", "dub", "extend", "reframe", "finalize", "v2a", "interpolate"]);
+
+/** Two speakers to start a dialogue with. */
+const defaultLines = (m: ModelDef) => {
+ const v = m.options.voices ?? [];
+ return [
+ { text: "", voice: v[0]?.id },
+ { text: "", voice: v[1]?.id ?? v[0]?.id },
+ ];
+};
+
// ---------------------------------------------------------------------------
// Chips
@@ -248,6 +261,7 @@ function buildRequest(
endImage: s.endImage?.ref || undefined,
mask: s.mask?.ref || undefined,
sketch: s.sketch?.ref || undefined,
+ voiceAudio: s.voiceAudio?.ref || undefined,
video: s.video?.ref || undefined,
audio: s.audio?.ref || undefined,
},
@@ -440,6 +454,11 @@ export function Composer({ docked }: { docked: boolean }) {
/>
)}
+ {/* Dialogue script */}
+ {model && (studioOp ?? op) === "dialogue" && (
+ <DialogueEditor model={model} lines={p.dialogue ?? defaultLines(model)} onChange={(dialogue) => setP({ dialogue })} />
+ )}
+
{/* Multi-shot */}
{model?.options.multiShot && p.shots && <ShotsEditor model={model} shots={p.shots} onChange={(shots) => setP({ shots })} />}
@@ -560,9 +579,23 @@ export function Composer({ docked }: { docked: boolean }) {
{config.kind === "image" && (
<SegmentChip icon={CopyIcon} label="Images" options={[1, 2, 3, 4]} value={p.numOutputs ?? 1} onChange={(v) => setP({ numOutputs: v })} format={(v) => `×${v}`} />
)}
- {config.kind === "video" && op !== "lipsync" && op !== "avatar" && op !== "upscale-video" && (
+ {config.kind === "video" && !SINGLE_TAKE.has((studioOp ?? op)!) && (
<SegmentChip icon={CopyIcon} label="Videos" options={[1, 2, 3, 4]} value={p.numOutputs ?? 1} onChange={(v) => setP({ numOutputs: v })} format={(v) => `×${v}`} />
)}
+ {model && (opts.voices?.length || opts.voiceClone) && (studioOp ?? op) !== "dialogue" && (
+ <VoicePicker
+ model={model}
+ voice={p.voice}
+ sample={draft.slots.voiceAudio}
+ label={(studioOp ?? op) === "voice-change" ? "New voice" : "Voice"}
+ onChange={(c) => {
+ if (c?.kind === "preset") setDraft((d) => ({ params: { ...d.params, voice: c.id }, slots: { ...d.slots, voiceAudio: null } }));
+ if (c?.kind === "sample") setSlot("voiceAudio", c.value);
+ }}
+ />
+ )}
+ {model && opts.languages && <LanguageChip languages={opts.languages} value={p.targetLanguage} onChange={(targetLanguage) => setP({ targetLanguage })} />}
+ {model && opts.sliders && <SlidersChip model={model} values={p.extra ?? {}} onChange={setExtra} />}
{opts.multiShot && model && <MultiShotChip model={model} params={p} onChange={setP} />}
{opts.draft && (
<Tooltip>
diff --git a/src/components/studio/mode-switch-studio.tsx b/src/components/studio/mode-switch-studio.tsx
index 91d4cd83..32bbb004 100644
--- a/src/components/studio/mode-switch-studio.tsx
+++ b/src/components/studio/mode-switch-studio.tsx
@@ -2,7 +2,17 @@
import { useRouter, useSearchParams } from "next/navigation";
import { Suspense } from "react";
-import { AUDIO_STUDIO, FOLEY_STUDIO, UPSCALE_STUDIO, VIDEO_UPSCALE_STUDIO } from "@/lib/studios";
+import {
+ AUDIO_STUDIO,
+ DIALOGUE_STUDIO,
+ FOLEY_STUDIO,
+ MUSIC_STUDIO,
+ SFX_STUDIO,
+ TRANSLATE_STUDIO,
+ UPSCALE_STUDIO,
+ VIDEO_UPSCALE_STUDIO,
+ VOICE_CHANGE_STUDIO,
+} from "@/lib/studios";
import { cn } from "@/lib/utils";
import { StudioPage } from "./studio-page";
@@ -12,7 +22,12 @@ const MODES = {
{ id: "video", label: "Video", config: VIDEO_UPSCALE_STUDIO },
],
audio: [
- { id: "audio", label: "Voice, SFX & music", config: AUDIO_STUDIO },
+ { id: "speech", label: "Speech", config: AUDIO_STUDIO },
+ { id: "dialogue", label: "Dialogue", config: DIALOGUE_STUDIO },
+ { id: "voice-change", label: "Voice change", config: VOICE_CHANGE_STUDIO },
+ { id: "translate", label: "Translate", config: TRANSLATE_STUDIO },
+ { id: "sfx", label: "Sound effects", config: SFX_STUDIO },
+ { id: "music", label: "Music", config: MUSIC_STUDIO },
{ id: "video", label: "Sound for video", config: FOLEY_STUDIO },
],
} as const;
@@ -23,13 +38,13 @@ function Inner({ kind }: { kind: keyof typeof MODES }) {
const modes = MODES[kind];
const current = modes.find((m) => m.id === sp.get("mode")) ?? (sp.get("video") ? modes.find((m) => m.id === "video") : undefined) ?? modes[0];
const tabs = (
- <div className="hidden h-9 items-center rounded-full bg-muted p-0.5 sm:inline-flex">
+ <div className="scrollbar-none inline-flex h-9 max-w-[52vw] items-center overflow-x-auto rounded-full bg-muted p-0.5 lg:max-w-none">
{modes.map((m) => (
<button
key={m.id}
onClick={() => router.replace(`?mode=${m.id}`)}
className={cn(
- "h-8 rounded-full px-3 text-[13px] font-medium text-muted-foreground transition",
+ "h-8 shrink-0 rounded-full px-3 text-[13px] font-medium whitespace-nowrap text-muted-foreground transition",
current.id === m.id && "bg-background text-foreground shadow-soft",
)}
>
diff --git a/src/components/studio/prompt-input.tsx b/src/components/studio/prompt-input.tsx
index c3edfd7d..52a1a377 100644
--- a/src/components/studio/prompt-input.tsx
+++ b/src/components/studio/prompt-input.tsx
@@ -1,6 +1,6 @@
"use client";
-import { AtSign, MapPin, Package, Palette, Plus, ScanFace } from "lucide-react";
+import { AtSign, AudioLines, MapPin, Package, Palette, Plus, ScanFace } from "lucide-react";
import Link from "next/link";
import { forwardRef, useImperativeHandle, useMemo, useRef, useState } from "react";
import { elementKindInfo, mentionAtCaret, type ElementKind, type StudioElement } from "@/lib/catalog/elements";
@@ -11,6 +11,7 @@ export const ELEMENT_ICONS: Record<ElementKind, typeof ScanFace> = {
location: MapPin,
prop: Package,
style: Palette,
+ voice: AudioLines,
};
export interface PromptInputHandle {
@@ -62,17 +63,18 @@ export const PromptInput = forwardRef<
const [active, setActive] = useState(0);
const [dismissed, setDismissed] = useState<number | null>(null);
- const handles = useMemo(() => new Set(elements.map((e) => e.handle.toLowerCase())), [elements]);
+ const visual = useMemo(() => elements.filter((e) => e.kind !== "voice"), [elements]);
+ const handles = useMemo(() => new Set(visual.map((e) => e.handle.toLowerCase())), [visual]);
const mention = caret != null ? mentionAtCaret(value, caret) : null;
const open = !!mention && dismissed !== mention.start;
const matches = useMemo(() => {
if (!mention) return [];
const q = mention.query.toLowerCase();
- return elements
+ return visual
.filter((e) => !q || e.handle.toLowerCase().includes(q) || e.name.toLowerCase().includes(q))
.sort((a, b) => Number(b.handle.toLowerCase().startsWith(q)) - Number(a.handle.toLowerCase().startsWith(q)))
.slice(0, 8);
- }, [mention, elements]);
+ }, [mention, visual]);
const syncCaret = () => setCaret(ta.current?.selectionStart ?? null);
@@ -200,7 +202,7 @@ export const PromptInput = forwardRef<
})}
{!matches.length && (
<p className="px-2 py-3 text-[13px] text-muted-foreground">
- {elements.length ? "No element with that name." : "No elements yet. Save a character, location or prop once, then @mention it anywhere."}
+ {visual.length ? "No element with that name." : "No elements yet. Save a character, location or prop once, then @mention it anywhere."}
</p>
)}
<Link href="/elements?new=1" className="mt-1 flex items-center gap-2 rounded-lg border-t px-2 py-2 text-[13px] text-muted-foreground hover:bg-accent hover:text-foreground">
diff --git a/src/components/studio/voice-recorder.tsx b/src/components/studio/voice-recorder.tsx
new file mode 100644
index 00000000..4f4e34f9
--- /dev/null
+++ b/src/components/studio/voice-recorder.tsx
@@ -0,0 +1,111 @@
+"use client";
+
+import { Loader2, Mic, Square } from "lucide-react";
+import { useEffect, useRef, useState } from "react";
+import { toast } from "sonner";
+import { uploadFile } from "@/lib/api";
+import { cn } from "@/lib/utils";
+import type { SlotValue } from "./media-slot";
+
+/** Decode any recording the browser made and re-encode it as 16-bit mono WAV — every voice API takes WAV. */
+export async function toWav(blob: Blob): Promise<File> {
+ const ctx = new AudioContext();
+ try {
+ const buf = await ctx.decodeAudioData(await blob.arrayBuffer());
+ const rate = buf.sampleRate;
+ const mono = new Float32Array(buf.length);
+ for (let c = 0; c < buf.numberOfChannels; c++) {
+ const d = buf.getChannelData(c);
+ for (let i = 0; i < d.length; i++) mono[i] += d[i] / buf.numberOfChannels;
+ }
+ const out = new DataView(new ArrayBuffer(44 + mono.length * 2));
+ const str = (o: number, s: string) => [...s].forEach((ch, i) => out.setUint8(o + i, ch.charCodeAt(0)));
+ str(0, "RIFF");
+ out.setUint32(4, 36 + mono.length * 2, true);
+ str(8, "WAVEfmt ");
+ out.setUint32(16, 16, true);
+ out.setUint16(20, 1, true);
+ out.setUint16(22, 1, true);
+ out.setUint32(24, rate, true);
+ out.setUint32(28, rate * 2, true);
+ out.setUint16(32, 2, true);
+ out.setUint16(34, 16, true);
+ str(36, "data");
+ out.setUint32(40, mono.length * 2, true);
+ mono.forEach((v, i) => out.setInt16(44 + i * 2, Math.max(-1, Math.min(1, v)) * 0x7fff, true));
+ return new File([out.buffer], `recording-${Date.now()}.wav`, { type: "audio/wav" });
+ } finally {
+ void ctx.close();
+ }
+}
+
+/** Mic button: record a voice sample, convert it to WAV and upload it. */
+export function VoiceRecorder({ onRecorded, max = 60, className }: { onRecorded: (v: SlotValue) => void; max?: number; className?: string }) {
+ const [state, setState] = useState<"idle" | "recording" | "saving">("idle");
+ const [secs, setSecs] = useState(0);
+ const rec = useRef<MediaRecorder | null>(null);
+ const timer = useRef<ReturnType<typeof setInterval> | null>(null);
+
+ useEffect(
+ () => () => {
+ if (timer.current) clearInterval(timer.current);
+ rec.current?.stream.getTracks().forEach((t) => t.stop());
+ },
+ [],
+ );
+
+ const stop = () => rec.current?.state === "recording" && rec.current.stop();
+
+ const start = async () => {
+ let stream: MediaStream;
+ try {
+ stream = await navigator.mediaDevices.getUserMedia({ audio: { echoCancellation: true, noiseSuppression: true } });
+ } catch {
+ toast.error("Fuobe needs microphone access to record — allow it in your browser, or upload a file instead.");
+ return;
+ }
+ const chunks: Blob[] = [];
+ const r = new MediaRecorder(stream);
+ rec.current = r;
+ r.ondataavailable = (e) => e.data.size && chunks.push(e.data);
+ r.onstop = async () => {
+ if (timer.current) clearInterval(timer.current);
+ stream.getTracks().forEach((t) => t.stop());
+ setState("saving");
+ try {
+ const file = await toWav(new Blob(chunks, { type: r.mimeType }));
+ const asset = await uploadFile(file);
+ onRecorded({ ref: asset.url, preview: asset.url, kind: "audio", name: "Recording" });
+ } catch (e) {
+ toast.error((e as Error).message || "Couldn't save the recording");
+ } finally {
+ setState("idle");
+ }
+ };
+ r.start();
+ setSecs(0);
+ setState("recording");
+ let elapsed = 0;
+ timer.current = setInterval(() => {
+ elapsed += 1;
+ setSecs(elapsed);
+ if (elapsed >= max) stop();
+ }, 1000);
+ };
+
+ return (
+ <button
+ type="button"
+ onClick={state === "recording" ? stop : start}
+ disabled={state === "saving"}
+ className={cn(
+ "inline-flex h-8 items-center gap-1.5 rounded-full px-3 text-[13px] font-medium transition-colors",
+ state === "recording" ? "bg-destructive text-white" : "bg-secondary text-secondary-foreground hover:bg-accent",
+ className,
+ )}
+ >
+ {state === "saving" ? <Loader2 className="size-3.5 animate-spin" /> : state === "recording" ? <Square className="size-3 fill-current" /> : <Mic className="size-3.5" />}
+ {state === "recording" ? `Stop · 0:${String(secs).padStart(2, "0")}` : state === "saving" ? "Saving…" : "Record"}
+ </button>
+ );
+}
diff --git a/src/lib/catalog/cloud-models.generated.ts b/src/lib/catalog/cloud-models.generated.ts
index f403ffcb..a0b685e7 100644
--- a/src/lib/catalog/cloud-models.generated.ts
+++ b/src/lib/catalog/cloud-models.generated.ts
@@ -1363,6 +1363,71 @@ export const CLOUD_MODELS: ModelDef[] = [
"usd": 0.03
}
},
+ {
+ "id": "flux-fill-pro",
+ "name": "FLUX.1 Fill [pro]",
+ "vendor": "Black Forest Labs",
+ "family": "flux",
+ "engine": "cloud",
+ "kind": "image",
+ "tagline": "Precise inpainting and object replacement with a mask",
+ "routes": [
+ {
+ "op": "inpaint",
+ "provider": "fal",
+ "endpoint": "fal-ai/flux-pro/v1/fill",
+ "map": {
+ "image": "image_url",
+ "mask": "mask_url",
+ "numOutputs": "num_images",
+ "seed": "seed"
+ }
+ }
+ ],
+ "options": {
+ "seed": true,
+ "maxOutputs": 4,
+ "maxImages": 1
+ },
+ "pricing": {
+ "unit": "megapixel",
+ "usd": 0.05
+ }
+ },
+ {
+ "id": "z-image-inpaint",
+ "name": "Z-Image Turbo Inpaint (hosted)",
+ "vendor": "Alibaba Tongyi",
+ "family": "z-image",
+ "engine": "cloud",
+ "kind": "image",
+ "tagline": "Cheapest, fastest masked inpainting",
+ "routes": [
+ {
+ "op": "inpaint",
+ "provider": "fal",
+ "endpoint": "fal-ai/z-image/turbo/inpaint",
+ "map": {
+ "image": "image_url",
+ "mask": "mask_image_url",
+ "numOutputs": "num_images",
+ "seed": "seed"
+ }
+ }
+ ],
+ "options": {
+ "seed": true,
+ "maxOutputs": 4,
+ "maxImages": 1
+ },
+ "badges": [
+ "fast"
+ ],
+ "pricing": {
+ "unit": "megapixel",
+ "usd": 0.01
+ }
+ },
{
"id": "recraft-4-1",
"name": "Recraft V4.1",
@@ -4981,6 +5046,16 @@ export const CLOUD_MODELS: ModelDef[] = [
}
],
"options": {
+ "sliders": [
+ {
+ "param": "strength",
+ "label": "Voice strength",
+ "min": 0.01,
+ "max": 1,
+ "step": 0.05,
+ "default": 0.01
+ }
+ ],
"maxImages": 1
},
"pricing": {
@@ -5152,7 +5227,7 @@ export const CLOUD_MODELS: ModelDef[] = [
"family": "elevenlabs",
"engine": "cloud",
"kind": "audio",
- "tagline": "Expressive multilingual speech",
+ "tagline": "Most expressive speech \u2014 audio tags like [whispers] and [laughs]",
"routes": [
{
"op": "tts",
@@ -5160,19 +5235,1529 @@ export const CLOUD_MODELS: ModelDef[] = [
"endpoint": "fal-ai/elevenlabs/tts/eleven-v3",
"map": {
"prompt": "text",
- "fixed": {
- "voice": "Rachel"
- }
+ "voice": "voice"
}
}
],
- "options": {},
+ "options": {
+ "voices": [
+ {
+ "id": "CwhRBWXzGAHq8TQ4Fs17",
+ "name": "Roger",
+ "hint": "Laid-Back, Casual, Resonant \u00b7 american"
+ },
+ {
+ "id": "EXAVITQu4vr4xnSDxMaL",
+ "name": "Sarah",
+ "hint": "Mature, Reassuring, Confident \u00b7 american"
+ },
+ {
+ "id": "FGY2WhTYpPnrIDTdsKH5",
+ "name": "Laura",
+ "hint": "Enthusiast, Quirky Attitude \u00b7 american"
+ },
+ {
+ "id": "IKne3meq5aSn9XLyUdCD",
+ "name": "Charlie",
+ "hint": "Deep, Confident, Energetic \u00b7 australian"
+ },
+ {
+ "id": "JBFqnCBsd6RMkjVDRZzb",
+ "name": "George",
+ "hint": "Warm, Captivating Storyteller \u00b7 british"
+ },
+ {
+ "id": "N2lVS1w4EtoT3dr4eOWO",
+ "name": "Callum",
+ "hint": "Husky Trickster \u00b7 american"
+ },
+ {
+ "id": "SAz9YHcvj6GT2YYXdXww",
+ "name": "River",
+ "hint": "Relaxed, Neutral, Informative \u00b7 american"
+ },
+ {
+ "id": "SOYHLrjzK2X1ezoPC6cr",
+ "name": "Harry",
+ "hint": "Fierce Warrior \u00b7 american"
+ },
+ {
+ "id": "TX3LPaxmHKxFdv7VOQHJ",
+ "name": "Liam",
+ "hint": "Energetic, Social Media Creator \u00b7 american"
+ },
+ {
+ "id": "Xb7hH8MSUJpSbSDYk0k2",
+ "name": "Alice",
+ "hint": "Clear, Engaging Educator \u00b7 british"
+ },
+ {
+ "id": "XrExE9yKIg1WjnnlVkGX",
+ "name": "Matilda",
+ "hint": "Knowledgable, Professional \u00b7 american"
+ },
+ {
+ "id": "bIHbv24MWmeRgasZH58o",
+ "name": "Will",
+ "hint": "Relaxed Optimist \u00b7 american"
+ },
+ {
+ "id": "cgSgspJ2msm6clMCkdW9",
+ "name": "Jessica",
+ "hint": "Playful, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "cjVigY5qzO86Huf0OWal",
+ "name": "Eric",
+ "hint": "Smooth, Trustworthy \u00b7 american"
+ },
+ {
+ "id": "hpp4J3VqNfWAUOO0d1Us",
+ "name": "Bella",
+ "hint": "Professional, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "iP95p4xoKVk53GoZ742B",
+ "name": "Chris",
+ "hint": "Charming, Down-to-Earth \u00b7 american"
+ },
+ {
+ "id": "nPczCjzI2devNBz1zQrb",
+ "name": "Brian",
+ "hint": "Deep, Resonant and Comforting \u00b7 american"
+ },
+ {
+ "id": "onwK4e9ZLuTAKqWW03F9",
+ "name": "Daniel",
+ "hint": "Steady Broadcaster \u00b7 british"
+ },
+ {
+ "id": "pFZP5JQG7iQjIQuC4Bku",
+ "name": "Lily",
+ "hint": "Velvety Actress \u00b7 british"
+ },
+ {
+ "id": "pNInz6obpgDQGcFmaJgB",
+ "name": "Adam",
+ "hint": "Dominant, Firm \u00b7 american"
+ },
+ {
+ "id": "pqHfZKP75CvOlQylNhV4",
+ "name": "Bill",
+ "hint": "Wise, Mature, Balanced \u00b7 american"
+ }
+ ],
+ "sliders": [
+ {
+ "param": "stability",
+ "label": "Stability",
+ "min": 0,
+ "max": 1,
+ "step": 0.05,
+ "default": 0.5
+ }
+ ]
+ },
+ "badges": [
+ "top"
+ ],
+ "defaults": {
+ "voice": "JBFqnCBsd6RMkjVDRZzb"
+ },
"pricing": {
"unit": "request",
"usd": 0.1,
"note": "per 1k chars"
}
},
+ {
+ "id": "elevenlabs-v4",
+ "name": "ElevenLabs v4",
+ "vendor": "ElevenLabs",
+ "family": "elevenlabs",
+ "engine": "cloud",
+ "kind": "audio",
+ "tagline": "Newest ElevenLabs voice model \u2014 natural, stable long-form",
+ "routes": [
+ {
+ "op": "tts",
+ "provider": "fal",
+ "endpoint": "elevenlabs/tts/eleven-v4",
+ "map": {
+ "prompt": "text",
+ "voice": "voice",
+ "seed": "seed"
+ }
+ }
+ ],
+ "options": {
+ "voices": [
+ {
+ "id": "CwhRBWXzGAHq8TQ4Fs17",
+ "name": "Roger",
+ "hint": "Laid-Back, Casual, Resonant \u00b7 american"
+ },
+ {
+ "id": "EXAVITQu4vr4xnSDxMaL",
+ "name": "Sarah",
+ "hint": "Mature, Reassuring, Confident \u00b7 american"
+ },
+ {
+ "id": "FGY2WhTYpPnrIDTdsKH5",
+ "name": "Laura",
+ "hint": "Enthusiast, Quirky Attitude \u00b7 american"
+ },
+ {
+ "id": "IKne3meq5aSn9XLyUdCD",
+ "name": "Charlie",
+ "hint": "Deep, Confident, Energetic \u00b7 australian"
+ },
+ {
+ "id": "JBFqnCBsd6RMkjVDRZzb",
+ "name": "George",
+ "hint": "Warm, Captivating Storyteller \u00b7 british"
+ },
+ {
+ "id": "N2lVS1w4EtoT3dr4eOWO",
+ "name": "Callum",
+ "hint": "Husky Trickster \u00b7 american"
+ },
+ {
+ "id": "SAz9YHcvj6GT2YYXdXww",
+ "name": "River",
+ "hint": "Relaxed, Neutral, Informative \u00b7 american"
+ },
+ {
+ "id": "SOYHLrjzK2X1ezoPC6cr",
+ "name": "Harry",
+ "hint": "Fierce Warrior \u00b7 american"
+ },
+ {
+ "id": "TX3LPaxmHKxFdv7VOQHJ",
+ "name": "Liam",
+ "hint": "Energetic, Social Media Creator \u00b7 american"
+ },
+ {
+ "id": "Xb7hH8MSUJpSbSDYk0k2",
+ "name": "Alice",
+ "hint": "Clear, Engaging Educator \u00b7 british"
+ },
+ {
+ "id": "XrExE9yKIg1WjnnlVkGX",
+ "name": "Matilda",
+ "hint": "Knowledgable, Professional \u00b7 american"
+ },
+ {
+ "id": "bIHbv24MWmeRgasZH58o",
+ "name": "Will",
+ "hint": "Relaxed Optimist \u00b7 american"
+ },
+ {
+ "id": "cgSgspJ2msm6clMCkdW9",
+ "name": "Jessica",
+ "hint": "Playful, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "cjVigY5qzO86Huf0OWal",
+ "name": "Eric",
+ "hint": "Smooth, Trustworthy \u00b7 american"
+ },
+ {
+ "id": "hpp4J3VqNfWAUOO0d1Us",
+ "name": "Bella",
+ "hint": "Professional, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "iP95p4xoKVk53GoZ742B",
+ "name": "Chris",
+ "hint": "Charming, Down-to-Earth \u00b7 american"
+ },
+ {
+ "id": "nPczCjzI2devNBz1zQrb",
+ "name": "Brian",
+ "hint": "Deep, Resonant and Comforting \u00b7 american"
+ },
+ {
+ "id": "onwK4e9ZLuTAKqWW03F9",
+ "name": "Daniel",
+ "hint": "Steady Broadcaster \u00b7 british"
+ },
+ {
+ "id": "pFZP5JQG7iQjIQuC4Bku",
+ "name": "Lily",
+ "hint": "Velvety Actress \u00b7 british"
+ },
+ {
+ "id": "pNInz6obpgDQGcFmaJgB",
+ "name": "Adam",
+ "hint": "Dominant, Firm \u00b7 american"
+ },
+ {
+ "id": "pqHfZKP75CvOlQylNhV4",
+ "name": "Bill",
+ "hint": "Wise, Mature, Balanced \u00b7 american"
+ }
+ ],
+ "sliders": [
+ {
+ "param": "stability",
+ "label": "Stability",
+ "min": 0,
+ "max": 1,
+ "step": 0.05,
+ "default": 0.5
+ },
+ {
+ "param": "similarity_boost",
+ "label": "Similarity",
+ "min": 0,
+ "max": 1,
+ "step": 0.05,
+ "default": 0.75
+ }
+ ],
+ "seed": true
+ },
+ "badges": [
+ "new"
+ ],
+ "defaults": {
+ "voice": "JBFqnCBsd6RMkjVDRZzb"
+ },
+ "pricing": {
+ "unit": "request",
+ "usd": 0.08,
+ "note": "per 1k chars"
+ }
+ },
+ {
+ "id": "elevenlabs-v4-turbo",
+ "name": "ElevenLabs v4 Turbo",
+ "vendor": "ElevenLabs",
+ "family": "elevenlabs",
+ "engine": "cloud",
+ "kind": "audio",
+ "tagline": "Low-latency v4 at half the price",
+ "routes": [
+ {
+ "op": "tts",
+ "provider": "fal",
+ "endpoint": "elevenlabs/tts/eleven-v4-turbo",
+ "map": {
+ "prompt": "text",
+ "voice": "voice",
+ "seed": "seed"
+ }
+ }
+ ],
+ "options": {
+ "voices": [
+ {
+ "id": "CwhRBWXzGAHq8TQ4Fs17",
+ "name": "Roger",
+ "hint": "Laid-Back, Casual, Resonant \u00b7 american"
+ },
+ {
+ "id": "EXAVITQu4vr4xnSDxMaL",
+ "name": "Sarah",
+ "hint": "Mature, Reassuring, Confident \u00b7 american"
+ },
+ {
+ "id": "FGY2WhTYpPnrIDTdsKH5",
+ "name": "Laura",
+ "hint": "Enthusiast, Quirky Attitude \u00b7 american"
+ },
+ {
+ "id": "IKne3meq5aSn9XLyUdCD",
+ "name": "Charlie",
+ "hint": "Deep, Confident, Energetic \u00b7 australian"
+ },
+ {
+ "id": "JBFqnCBsd6RMkjVDRZzb",
+ "name": "George",
+ "hint": "Warm, Captivating Storyteller \u00b7 british"
+ },
+ {
+ "id": "N2lVS1w4EtoT3dr4eOWO",
+ "name": "Callum",
+ "hint": "Husky Trickster \u00b7 american"
+ },
+ {
+ "id": "SAz9YHcvj6GT2YYXdXww",
+ "name": "River",
+ "hint": "Relaxed, Neutral, Informative \u00b7 american"
+ },
+ {
+ "id": "SOYHLrjzK2X1ezoPC6cr",
+ "name": "Harry",
+ "hint": "Fierce Warrior \u00b7 american"
+ },
+ {
+ "id": "TX3LPaxmHKxFdv7VOQHJ",
+ "name": "Liam",
+ "hint": "Energetic, Social Media Creator \u00b7 american"
+ },
+ {
+ "id": "Xb7hH8MSUJpSbSDYk0k2",
+ "name": "Alice",
+ "hint": "Clear, Engaging Educator \u00b7 british"
+ },
+ {
+ "id": "XrExE9yKIg1WjnnlVkGX",
+ "name": "Matilda",
+ "hint": "Knowledgable, Professional \u00b7 american"
+ },
+ {
+ "id": "bIHbv24MWmeRgasZH58o",
+ "name": "Will",
+ "hint": "Relaxed Optimist \u00b7 american"
+ },
+ {
+ "id": "cgSgspJ2msm6clMCkdW9",
+ "name": "Jessica",
+ "hint": "Playful, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "cjVigY5qzO86Huf0OWal",
+ "name": "Eric",
+ "hint": "Smooth, Trustworthy \u00b7 american"
+ },
+ {
+ "id": "hpp4J3VqNfWAUOO0d1Us",
+ "name": "Bella",
+ "hint": "Professional, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "iP95p4xoKVk53GoZ742B",
+ "name": "Chris",
+ "hint": "Charming, Down-to-Earth \u00b7 american"
+ },
+ {
+ "id": "nPczCjzI2devNBz1zQrb",
+ "name": "Brian",
+ "hint": "Deep, Resonant and Comforting \u00b7 american"
+ },
+ {
+ "id": "onwK4e9ZLuTAKqWW03F9",
+ "name": "Daniel",
+ "hint": "Steady Broadcaster \u00b7 british"
+ },
+ {
+ "id": "pFZP5JQG7iQjIQuC4Bku",
+ "name": "Lily",
+ "hint": "Velvety Actress \u00b7 british"
+ },
+ {
+ "id": "pNInz6obpgDQGcFmaJgB",
+ "name": "Adam",
+ "hint": "Dominant, Firm \u00b7 american"
+ },
+ {
+ "id": "pqHfZKP75CvOlQylNhV4",
+ "name": "Bill",
+ "hint": "Wise, Mature, Balanced \u00b7 american"
+ }
+ ],
+ "sliders": [
+ {
+ "param": "stability",
+ "label": "Stability",
+ "min": 0,
+ "max": 1,
+ "step": 0.05,
+ "default": 0.5
+ },
+ {
+ "param": "similarity_boost",
+ "label": "Similarity",
+ "min": 0,
+ "max": 1,
+ "step": 0.05,
+ "default": 0.75
+ }
+ ],
+ "seed": true
+ },
+ "badges": [
+ "fast"
+ ],
+ "defaults": {
+ "voice": "JBFqnCBsd6RMkjVDRZzb"
+ },
+ "pricing": {
+ "unit": "request",
+ "usd": 0.04,
+ "note": "per 1k chars"
+ }
+ },
+ {
+ "id": "elevenlabs-multilingual-v2",
+ "name": "ElevenLabs Multilingual v2",
+ "vendor": "ElevenLabs",
+ "family": "elevenlabs",
+ "engine": "cloud",
+ "kind": "audio",
+ "tagline": "29 languages with speed and style control",
+ "routes": [
+ {
+ "op": "tts",
+ "provider": "fal",
+ "endpoint": "fal-ai/elevenlabs/tts/multilingual-v2",
+ "map": {
+ "prompt": "text",
+ "voice": "voice"
+ }
+ }
+ ],
+ "options": {
+ "voices": [
+ {
+ "id": "CwhRBWXzGAHq8TQ4Fs17",
+ "name": "Roger",
+ "hint": "Laid-Back, Casual, Resonant \u00b7 american"
+ },
+ {
+ "id": "EXAVITQu4vr4xnSDxMaL",
+ "name": "Sarah",
+ "hint": "Mature, Reassuring, Confident \u00b7 american"
+ },
+ {
+ "id": "FGY2WhTYpPnrIDTdsKH5",
+ "name": "Laura",
+ "hint": "Enthusiast, Quirky Attitude \u00b7 american"
+ },
+ {
+ "id": "IKne3meq5aSn9XLyUdCD",
+ "name": "Charlie",
+ "hint": "Deep, Confident, Energetic \u00b7 australian"
+ },
+ {
+ "id": "JBFqnCBsd6RMkjVDRZzb",
+ "name": "George",
+ "hint": "Warm, Captivating Storyteller \u00b7 british"
+ },
+ {
+ "id": "N2lVS1w4EtoT3dr4eOWO",
+ "name": "Callum",
+ "hint": "Husky Trickster \u00b7 american"
+ },
+ {
+ "id": "SAz9YHcvj6GT2YYXdXww",
+ "name": "River",
+ "hint": "Relaxed, Neutral, Informative \u00b7 american"
+ },
+ {
+ "id": "SOYHLrjzK2X1ezoPC6cr",
+ "name": "Harry",
+ "hint": "Fierce Warrior \u00b7 american"
+ },
+ {
+ "id": "TX3LPaxmHKxFdv7VOQHJ",
+ "name": "Liam",
+ "hint": "Energetic, Social Media Creator \u00b7 american"
+ },
+ {
+ "id": "Xb7hH8MSUJpSbSDYk0k2",
+ "name": "Alice",
+ "hint": "Clear, Engaging Educator \u00b7 british"
+ },
+ {
+ "id": "XrExE9yKIg1WjnnlVkGX",
+ "name": "Matilda",
+ "hint": "Knowledgable, Professional \u00b7 american"
+ },
+ {
+ "id": "bIHbv24MWmeRgasZH58o",
+ "name": "Will",
+ "hint": "Relaxed Optimist \u00b7 american"
+ },
+ {
+ "id": "cgSgspJ2msm6clMCkdW9",
+ "name": "Jessica",
+ "hint": "Playful, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "cjVigY5qzO86Huf0OWal",
+ "name": "Eric",
+ "hint": "Smooth, Trustworthy \u00b7 american"
+ },
+ {
+ "id": "hpp4J3VqNfWAUOO0d1Us",
+ "name": "Bella",
+ "hint": "Professional, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "iP95p4xoKVk53GoZ742B",
+ "name": "Chris",
+ "hint": "Charming, Down-to-Earth \u00b7 american"
+ },
+ {
+ "id": "nPczCjzI2devNBz1zQrb",
+ "name": "Brian",
+ "hint": "Deep, Resonant and Comforting \u00b7 american"
+ },
+ {
+ "id": "onwK4e9ZLuTAKqWW03F9",
+ "name": "Daniel",
+ "hint": "Steady Broadcaster \u00b7 british"
+ },
+ {
+ "id": "pFZP5JQG7iQjIQuC4Bku",
+ "name": "Lily",
+ "hint": "Velvety Actress \u00b7 british"
+ },
+ {
+ "id": "pNInz6obpgDQGcFmaJgB",
+ "name": "Adam",
+ "hint": "Dominant, Firm \u00b7 american"
+ },
+ {
+ "id": "pqHfZKP75CvOlQylNhV4",
+ "name": "Bill",
+ "hint": "Wise, Mature, Balanced \u00b7 american"
+ }
+ ],
+ "sliders": [
+ {
+ "param": "stability",
+ "label": "Stability",
+ "min": 0,
+ "max": 1,
+ "step": 0.05,
+ "default": 0.5
+ },
+ {
+ "param": "similarity_boost",
+ "label": "Similarity",
+ "min": 0,
+ "max": 1,
+ "step": 0.05,
+ "default": 0.75
+ },
+ {
+ "param": "style",
+ "label": "Style exaggeration",
+ "min": 0,
+ "max": 1,
+ "step": 0.05,
+ "default": 0
+ },
+ {
+ "param": "speed",
+ "label": "Speed",
+ "min": 0.7,
+ "max": 1.2,
+ "step": 0.05,
+ "default": 1
+ }
+ ]
+ },
+ "defaults": {
+ "voice": "JBFqnCBsd6RMkjVDRZzb"
+ },
+ "pricing": {
+ "unit": "request",
+ "usd": 0.1,
+ "note": "per 1k chars"
+ }
+ },
+ {
+ "id": "elevenlabs-dialogue",
+ "name": "ElevenLabs Dialogue",
+ "vendor": "ElevenLabs",
+ "family": "elevenlabs",
+ "engine": "cloud",
+ "kind": "audio",
+ "tagline": "Several speakers, one natural conversation",
+ "routes": [
+ {
+ "op": "dialogue",
+ "provider": "fal",
+ "endpoint": "fal-ai/elevenlabs/text-to-dialogue/eleven-v3",
+ "map": {
+ "prompt": false,
+ "dialogue": {
+ "key": "inputs",
+ "text": "text",
+ "voice": "voice"
+ },
+ "seed": "seed"
+ }
+ }
+ ],
+ "options": {
+ "voices": [
+ {
+ "id": "CwhRBWXzGAHq8TQ4Fs17",
+ "name": "Roger",
+ "hint": "Laid-Back, Casual, Resonant \u00b7 american"
+ },
+ {
+ "id": "EXAVITQu4vr4xnSDxMaL",
+ "name": "Sarah",
+ "hint": "Mature, Reassuring, Confident \u00b7 american"
+ },
+ {
+ "id": "FGY2WhTYpPnrIDTdsKH5",
+ "name": "Laura",
+ "hint": "Enthusiast, Quirky Attitude \u00b7 american"
+ },
+ {
+ "id": "IKne3meq5aSn9XLyUdCD",
+ "name": "Charlie",
+ "hint": "Deep, Confident, Energetic \u00b7 australian"
+ },
+ {
+ "id": "JBFqnCBsd6RMkjVDRZzb",
+ "name": "George",
+ "hint": "Warm, Captivating Storyteller \u00b7 british"
+ },
+ {
+ "id": "N2lVS1w4EtoT3dr4eOWO",
+ "name": "Callum",
+ "hint": "Husky Trickster \u00b7 american"
+ },
+ {
+ "id": "SAz9YHcvj6GT2YYXdXww",
+ "name": "River",
+ "hint": "Relaxed, Neutral, Informative \u00b7 american"
+ },
+ {
+ "id": "SOYHLrjzK2X1ezoPC6cr",
+ "name": "Harry",
+ "hint": "Fierce Warrior \u00b7 american"
+ },
+ {
+ "id": "TX3LPaxmHKxFdv7VOQHJ",
+ "name": "Liam",
+ "hint": "Energetic, Social Media Creator \u00b7 american"
+ },
+ {
+ "id": "Xb7hH8MSUJpSbSDYk0k2",
+ "name": "Alice",
+ "hint": "Clear, Engaging Educator \u00b7 british"
+ },
+ {
+ "id": "XrExE9yKIg1WjnnlVkGX",
+ "name": "Matilda",
+ "hint": "Knowledgable, Professional \u00b7 american"
+ },
+ {
+ "id": "bIHbv24MWmeRgasZH58o",
+ "name": "Will",
+ "hint": "Relaxed Optimist \u00b7 american"
+ },
+ {
+ "id": "cgSgspJ2msm6clMCkdW9",
+ "name": "Jessica",
+ "hint": "Playful, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "cjVigY5qzO86Huf0OWal",
+ "name": "Eric",
+ "hint": "Smooth, Trustworthy \u00b7 american"
+ },
+ {
+ "id": "hpp4J3VqNfWAUOO0d1Us",
+ "name": "Bella",
+ "hint": "Professional, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "iP95p4xoKVk53GoZ742B",
+ "name": "Chris",
+ "hint": "Charming, Down-to-Earth \u00b7 american"
+ },
+ {
+ "id": "nPczCjzI2devNBz1zQrb",
+ "name": "Brian",
+ "hint": "Deep, Resonant and Comforting \u00b7 american"
+ },
+ {
+ "id": "onwK4e9ZLuTAKqWW03F9",
+ "name": "Daniel",
+ "hint": "Steady Broadcaster \u00b7 british"
+ },
+ {
+ "id": "pFZP5JQG7iQjIQuC4Bku",
+ "name": "Lily",
+ "hint": "Velvety Actress \u00b7 british"
+ },
+ {
+ "id": "pNInz6obpgDQGcFmaJgB",
+ "name": "Adam",
+ "hint": "Dominant, Firm \u00b7 american"
+ },
+ {
+ "id": "pqHfZKP75CvOlQylNhV4",
+ "name": "Bill",
+ "hint": "Wise, Mature, Balanced \u00b7 american"
+ }
+ ],
+ "sliders": [
+ {
+ "param": "stability",
+ "label": "Stability",
+ "min": 0,
+ "max": 1,
+ "step": 0.05,
+ "default": 0
+ }
+ ],
+ "seed": true
+ },
+ "badges": [
+ "new"
+ ],
+ "defaults": {
+ "voice": "JBFqnCBsd6RMkjVDRZzb"
+ },
+ "pricing": {
+ "unit": "request",
+ "usd": 0.1,
+ "note": "per 1k chars"
+ }
+ },
+ {
+ "id": "chatterbox-cloud",
+ "name": "Chatterbox (hosted)",
+ "vendor": "Resemble AI",
+ "family": "chatterbox",
+ "engine": "cloud",
+ "kind": "audio",
+ "tagline": "Clone any voice from a 10-second sample",
+ "routes": [
+ {
+ "op": "tts",
+ "provider": "fal",
+ "endpoint": "fal-ai/chatterbox/text-to-speech",
+ "map": {
+ "prompt": "text",
+ "voiceAudio": "audio_url",
+ "seed": "seed"
+ }
+ }
+ ],
+ "options": {
+ "voiceClone": true,
+ "sliders": [
+ {
+ "param": "exaggeration",
+ "label": "Emotion",
+ "min": 0,
+ "max": 1,
+ "step": 0.05,
+ "default": 0.25
+ },
+ {
+ "param": "temperature",
+ "label": "Variety",
+ "min": 0.05,
+ "max": 2,
+ "step": 0.05,
+ "default": 0.7
+ },
+ {
+ "param": "cfg",
+ "label": "Pace / guidance",
+ "min": 0.1,
+ "max": 1,
+ "step": 0.05,
+ "default": 0.5
+ }
+ ],
+ "seed": true
+ },
+ "pricing": {
+ "unit": "request",
+ "usd": 0.025,
+ "note": "per 1k chars"
+ }
+ },
+ {
+ "id": "index-tts-2-cloud",
+ "name": "IndexTTS-2 (hosted)",
+ "vendor": "Bilibili",
+ "family": "index-tts",
+ "engine": "cloud",
+ "kind": "audio",
+ "tagline": "Zero-shot cloning with emotion control",
+ "routes": [
+ {
+ "op": "tts",
+ "provider": "fal",
+ "endpoint": "fal-ai/index-tts-2/text-to-speech",
+ "map": {
+ "voiceAudio": "audio_url"
+ }
+ }
+ ],
+ "options": {
+ "voiceClone": true,
+ "sliders": [
+ {
+ "param": "strength",
+ "label": "Voice strength",
+ "min": 0,
+ "max": 1,
+ "step": 0.05,
+ "default": 1
+ }
+ ]
+ },
+ "pricing": {
+ "unit": "second",
+ "usd": 0.002
+ }
+ },
+ {
+ "id": "elevenlabs-voice-changer",
+ "name": "ElevenLabs Voice Changer",
+ "vendor": "ElevenLabs",
+ "family": "elevenlabs",
+ "engine": "cloud",
+ "kind": "audio",
+ "tagline": "Re-voice a recording with any premade voice",
+ "routes": [
+ {
+ "op": "voice-change",
+ "provider": "fal",
+ "endpoint": "fal-ai/elevenlabs/voice-changer",
+ "map": {
+ "prompt": false,
+ "voice": "voice",
+ "audio": "audio_url",
+ "seed": "seed"
+ }
+ }
+ ],
+ "options": {
+ "voices": [
+ {
+ "id": "CwhRBWXzGAHq8TQ4Fs17",
+ "name": "Roger",
+ "hint": "Laid-Back, Casual, Resonant \u00b7 american"
+ },
+ {
+ "id": "EXAVITQu4vr4xnSDxMaL",
+ "name": "Sarah",
+ "hint": "Mature, Reassuring, Confident \u00b7 american"
+ },
+ {
+ "id": "FGY2WhTYpPnrIDTdsKH5",
+ "name": "Laura",
+ "hint": "Enthusiast, Quirky Attitude \u00b7 american"
+ },
+ {
+ "id": "IKne3meq5aSn9XLyUdCD",
+ "name": "Charlie",
+ "hint": "Deep, Confident, Energetic \u00b7 australian"
+ },
+ {
+ "id": "JBFqnCBsd6RMkjVDRZzb",
+ "name": "George",
+ "hint": "Warm, Captivating Storyteller \u00b7 british"
+ },
+ {
+ "id": "N2lVS1w4EtoT3dr4eOWO",
+ "name": "Callum",
+ "hint": "Husky Trickster \u00b7 american"
+ },
+ {
+ "id": "SAz9YHcvj6GT2YYXdXww",
+ "name": "River",
+ "hint": "Relaxed, Neutral, Informative \u00b7 american"
+ },
+ {
+ "id": "SOYHLrjzK2X1ezoPC6cr",
+ "name": "Harry",
+ "hint": "Fierce Warrior \u00b7 american"
+ },
+ {
+ "id": "TX3LPaxmHKxFdv7VOQHJ",
+ "name": "Liam",
+ "hint": "Energetic, Social Media Creator \u00b7 american"
+ },
+ {
+ "id": "Xb7hH8MSUJpSbSDYk0k2",
+ "name": "Alice",
+ "hint": "Clear, Engaging Educator \u00b7 british"
+ },
+ {
+ "id": "XrExE9yKIg1WjnnlVkGX",
+ "name": "Matilda",
+ "hint": "Knowledgable, Professional \u00b7 american"
+ },
+ {
+ "id": "bIHbv24MWmeRgasZH58o",
+ "name": "Will",
+ "hint": "Relaxed Optimist \u00b7 american"
+ },
+ {
+ "id": "cgSgspJ2msm6clMCkdW9",
+ "name": "Jessica",
+ "hint": "Playful, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "cjVigY5qzO86Huf0OWal",
+ "name": "Eric",
+ "hint": "Smooth, Trustworthy \u00b7 american"
+ },
+ {
+ "id": "hpp4J3VqNfWAUOO0d1Us",
+ "name": "Bella",
+ "hint": "Professional, Bright, Warm \u00b7 american"
+ },
+ {
+ "id": "iP95p4xoKVk53GoZ742B",
+ "name": "Chris",
+ "hint": "Charming, Down-to-Earth \u00b7 american"
+ },
+ {
+ "id": "nPczCjzI2devNBz1zQrb",
+ "name": "Brian",
+ "hint": "Deep, Resonant and Comforting \u00b7 american"
+ },
+ {
+ "id": "onwK4e9ZLuTAKqWW03F9",
+ "name": "Daniel",
+ "hint": "Steady Broadcaster \u00b7 british"
+ },
+ {
+ "id": "pFZP5JQG7iQjIQuC4Bku",
+ "name": "Lily",
+ "hint": "Velvety Actress \u00b7 british"
+ },
+ {
+ "id": "pNInz6obpgDQGcFmaJgB",
+ "name": "Adam",
+ "hint": "Dominant, Firm \u00b7 american"
+ },
+ {
+ "id": "pqHfZKP75CvOlQylNhV4",
+ "name": "Bill",
+ "hint": "Wise, Mature, Balanced \u00b7 american"
+ }
+ ],
+ "seed": true
+ },
+ "defaults": {
+ "voice": "JBFqnCBsd6RMkjVDRZzb"
+ },
+ "pricing": {
+ "unit": "minute",
+ "usd": 0.3
+ }
+ },
+ {
+ "id": "chatterbox-vc-cloud",
+ "name": "Chatterbox Voice Conversion (hosted)",
+ "vendor": "Resemble AI",
+ "family": "chatterbox",
+ "engine": "cloud",
+ "kind": "audio",
+ "tagline": "Turn a recording into any voice from a sample",
+ "routes": [
+ {
+ "op": "voice-change",
+ "provider": "fal",
+ "endpoint": "fal-ai/chatterbox/speech-to-speech",
+ "map": {
+ "prompt": false,
+ "voiceAudio": "target_voice_audio_url",
+ "audio": "source_audio_url"
+ }
+ }
+ ],
+ "options": {
+ "voiceClone": true
+ },
+ "pricing": {
+ "unit": "minute",
+ "usd": 0.015
+ }
+ },
+ {
+ "id": "heygen-translate",
+ "name": "HeyGen Translate",
+ "vendor": "HeyGen",
+ "family": "heygen",
+ "engine": "cloud",
+ "kind": "video",
+ "tagline": "Lip-synced video translation into 170+ languages and accents",
+ "routes": [
+ {
+ "op": "dub",
+ "provider": "fal",
+ "endpoint": "fal-ai/heygen/v2/translate/precision",
+ "map": {
+ "prompt": false,
+ "targetLanguage": "output_language",
+ "video": "video_url"
+ }
+ }
+ ],
+ "options": {
+ "languages": [
+ "English",
+ "Spanish",
+ "French",
+ "Hindi",
+ "Italian",
+ "German",
+ "Polish",
+ "Portuguese",
+ "Chinese",
+ "Japanese",
+ "Dutch",
+ "Turkish",
+ "Korean",
+ "Danish",
+ "Arabic",
+ "Romanian",
+ "Mandarin",
+ "Filipino",
+ "Swedish",
+ "Indonesian",
+ "Ukrainian",
+ "Greek",
+ "Czech",
+ "Bulgarian",
+ "Malay",
+ "Slovak",
+ "Croatian",
+ "Tamil",
+ "Finnish",
+ "Russian",
+ "Afrikaans (South Africa)",
+ "Albanian (Albania)",
+ "Amharic (Ethiopia)",
+ "Arabic (Algeria)",
+ "Arabic (Bahrain)",
+ "Arabic (Egypt)",
+ "Arabic (Iraq)",
+ "Arabic (Jordan)",
+ "Arabic (Kuwait)",
+ "Arabic (Lebanon)",
+ "Arabic (Libya)",
+ "Arabic (Morocco)",
+ "Arabic (Oman)",
+ "Arabic (Qatar)",
+ "Arabic (Saudi Arabia)",
+ "Arabic (Syria)",
+ "Arabic (Tunisia)",
+ "Arabic (United Arab Emirates)",
+ "Arabic (Yemen)",
+ "Armenian (Armenia)",
+ "Azerbaijani (Latin, Azerbaijan)",
+ "Bangla (Bangladesh)",
+ "Basque",
+ "Bengali (India)",
+ "Bosnian (Bosnia and Herzegovina)",
+ "Bulgarian (Bulgaria)",
+ "Burmese (Myanmar)",
+ "Catalan",
+ "Chinese (Cantonese, Traditional)",
+ "Chinese (Jilu Mandarin, Simplified)",
+ "Chinese (Mandarin, Simplified)",
+ "Chinese (Northeastern Mandarin, Simplified)",
+ "Chinese (Southwestern Mandarin, Simplified)",
+ "Chinese (Taiwanese Mandarin, Traditional)",
+ "Chinese (Wu, Simplified)",
+ "Chinese (Zhongyuan Mandarin Henan, Simplified)",
+ "Chinese (Zhongyuan Mandarin Shaanxi, Simplified)",
+ "Croatian (Croatia)",
+ "Czech (Czechia)",
+ "Danish (Denmark)",
+ "Dutch (Belgium)",
+ "Dutch (Netherlands)",
+ "English (Australia)",
+ "English (Canada)",
+ "English (Hong Kong SAR)",
+ "English (India)",
+ "English (Ireland)",
+ "English (Kenya)",
+ "English (New Zealand)",
+ "English (Nigeria)",
+ "English (Philippines)",
+ "English (Singapore)",
+ "English (South Africa)",
+ "English (Tanzania)",
+ "English (UK)",
+ "English (United States)",
+ "Estonian (Estonia)",
+ "Filipino (Philippines)",
+ "Finnish (Finland)",
+ "French (Belgium)",
+ "French (Canada)",
+ "French (France)",
+ "French (Switzerland)",
+ "Galician",
+ "Georgian (Georgia)",
+ "German (Austria)",
+ "German (Germany)",
+ "German (Switzerland)",
+ "Greek (Greece)",
+ "Gujarati (India)",
+ "Hebrew (Israel)",
+ "Hindi (India)",
+ "Hungarian (Hungary)",
+ "Icelandic (Iceland)",
+ "Indonesian (Indonesia)",
+ "Irish (Ireland)",
+ "Italian (Italy)",
+ "Japanese (Japan)",
+ "Javanese (Latin, Indonesia)",
+ "Kannada (India)",
+ "Kazakh (Kazakhstan)",
+ "Khmer (Cambodia)",
+ "Korean (Korea)",
+ "Lao (Laos)",
+ "Latvian (Latvia)",
+ "Lithuanian (Lithuania)",
+ "Macedonian (North Macedonia)",
+ "Malay (Malaysia)",
+ "Malayalam (India)",
+ "Maltese (Malta)",
+ "Marathi (India)",
+ "Mongolian (Mongolia)",
+ "Nepali (Nepal)",
+ "Norwegian Bokm\u00e5l (Norway)",
+ "Pashto (Afghanistan)",
+ "Persian (Iran)",
+ "Polish (Poland)",
+ "Portuguese (Brazil)",
+ "Portuguese (Portugal)",
+ "Romanian (Romania)",
+ "Russian (Russia)",
+ "Serbian (Latin, Serbia)",
+ "Sinhala (Sri Lanka)",
+ "Slovak (Slovakia)",
+ "Slovenian (Slovenia)",
+ "Somali (Somalia)",
+ "Spanish (Argentina)",
+ "Spanish (Bolivia)",
+ "Spanish (Chile)",
+ "Spanish (Colombia)",
+ "Spanish (Costa Rica)",
+ "Spanish (Cuba)",
+ "Spanish (Dominican Republic)",
+ "Spanish (Ecuador)",
+ "Spanish (El Salvador)",
+ "Spanish (Equatorial Guinea)",
+ "Spanish (Guatemala)",
+ "Spanish (Honduras)",
+ "Spanish (Mexico)",
+ "Spanish (Nicaragua)",
+ "Spanish (Panama)",
+ "Spanish (Paraguay)",
+ "Spanish (Peru)",
+ "Spanish (Puerto Rico)",
+ "Spanish (Spain)",
+ "Spanish (United States)",
+ "Spanish (Uruguay)",
+ "Spanish (Venezuela)",
+ "Sundanese (Indonesia)",
+ "Swahili (Kenya)",
+ "Swahili (Tanzania)",
+ "Swedish (Sweden)",
+ "Tamil (India)",
+ "Tamil (Malaysia)",
+ "Tamil (Singapore)",
+ "Tamil (Sri Lanka)",
+ "Telugu (India)",
+ "Thai (Thailand)",
+ "Turkish (T\u00fcrkiye)",
+ "Ukrainian (Ukraine)",
+ "Urdu (India)",
+ "Urdu (Pakistan)",
+ "Uzbek (Latin, Uzbekistan)",
+ "Vietnamese (Vietnam)",
+ "Welsh (United Kingdom)",
+ "Zulu (South Africa)",
+ "English - Your Accent",
+ "English - American Accent"
+ ]
+ },
+ "badges": [
+ "top"
+ ],
+ "pricing": {
+ "unit": "second",
+ "usd": 0.1
+ }
+ },
+ {
+ "id": "heygen-translate-fast",
+ "name": "HeyGen Translate Speed",
+ "vendor": "HeyGen",
+ "family": "heygen",
+ "engine": "cloud",
+ "kind": "video",
+ "tagline": "Faster, cheaper lip-synced translation",
+ "routes": [
+ {
+ "op": "dub",
+ "provider": "fal",
+ "endpoint": "fal-ai/heygen/v2/translate/speed",
+ "map": {
+ "prompt": false,
+ "targetLanguage": "output_language",
+ "video": "video_url"
+ }
+ }
+ ],
+ "options": {
+ "languages": [
+ "English",
+ "Spanish",
+ "French",
+ "Hindi",
+ "Italian",
+ "German",
+ "Polish",
+ "Portuguese",
+ "Chinese",
+ "Japanese",
+ "Dutch",
+ "Turkish",
+ "Korean",
+ "Danish",
+ "Arabic",
+ "Romanian",
+ "Mandarin",
+ "Filipino",
+ "Swedish",
+ "Indonesian",
+ "Ukrainian",
+ "Greek",
+ "Czech",
+ "Bulgarian",
+ "Malay",
+ "Slovak",
+ "Croatian",
+ "Tamil",
+ "Finnish",
+ "Russian",
+ "Afrikaans (South Africa)",
+ "Albanian (Albania)",
+ "Amharic (Ethiopia)",
+ "Arabic (Algeria)",
+ "Arabic (Bahrain)",
+ "Arabic (Egypt)",
+ "Arabic (Iraq)",
+ "Arabic (Jordan)",
+ "Arabic (Kuwait)",
+ "Arabic (Lebanon)",
+ "Arabic (Libya)",
+ "Arabic (Morocco)",
+ "Arabic (Oman)",
+ "Arabic (Qatar)",
+ "Arabic (Saudi Arabia)",
+ "Arabic (Syria)",
+ "Arabic (Tunisia)",
+ "Arabic (United Arab Emirates)",
+ "Arabic (Yemen)",
+ "Armenian (Armenia)",
+ "Azerbaijani (Latin, Azerbaijan)",
+ "Bangla (Bangladesh)",
+ "Basque",
+ "Bengali (India)",
+ "Bosnian (Bosnia and Herzegovina)",
+ "Bulgarian (Bulgaria)",
+ "Burmese (Myanmar)",
+ "Catalan",
+ "Chinese (Cantonese, Traditional)",
+ "Chinese (Jilu Mandarin, Simplified)",
+ "Chinese (Mandarin, Simplified)",
+ "Chinese (Northeastern Mandarin, Simplified)",
+ "Chinese (Southwestern Mandarin, Simplified)",
+ "Chinese (Taiwanese Mandarin, Traditional)",
+ "Chinese (Wu, Simplified)",
+ "Chinese (Zhongyuan Mandarin Henan, Simplified)",
+ "Chinese (Zhongyuan Mandarin Shaanxi, Simplified)",
+ "Croatian (Croatia)",
+ "Czech (Czechia)",
+ "Danish (Denmark)",
+ "Dutch (Belgium)",
+ "Dutch (Netherlands)",
+ "English (Australia)",
+ "English (Canada)",
+ "English (Hong Kong SAR)",
+ "English (India)",
+ "English (Ireland)",
+ "English (Kenya)",
+ "English (New Zealand)",
+ "English (Nigeria)",
+ "English (Philippines)",
+ "English (Singapore)",
+ "English (South Africa)",
+ "English (Tanzania)",
+ "English (UK)",
+ "English (United States)",
+ "Estonian (Estonia)",
+ "Filipino (Philippines)",
+ "Finnish (Finland)",
+ "French (Belgium)",
+ "French (Canada)",
+ "French (France)",
+ "French (Switzerland)",
+ "Galician",
+ "Georgian (Georgia)",
+ "German (Austria)",
+ "German (Germany)",
+ "German (Switzerland)",
+ "Greek (Greece)",
+ "Gujarati (India)",
+ "Hebrew (Israel)",
+ "Hindi (India)",
+ "Hungarian (Hungary)",
+ "Icelandic (Iceland)",
+ "Indonesian (Indonesia)",
+ "Irish (Ireland)",
+ "Italian (Italy)",
+ "Japanese (Japan)",
+ "Javanese (Latin, Indonesia)",
+ "Kannada (India)",
+ "Kazakh (Kazakhstan)",
+ "Khmer (Cambodia)",
+ "Korean (Korea)",
+ "Lao (Laos)",
+ "Latvian (Latvia)",
+ "Lithuanian (Lithuania)",
+ "Macedonian (North Macedonia)",
+ "Malay (Malaysia)",
+ "Malayalam (India)",
+ "Maltese (Malta)",
+ "Marathi (India)",
+ "Mongolian (Mongolia)",
+ "Nepali (Nepal)",
+ "Norwegian Bokm\u00e5l (Norway)",
+ "Pashto (Afghanistan)",
+ "Persian (Iran)",
+ "Polish (Poland)",
+ "Portuguese (Brazil)",
+ "Portuguese (Portugal)",
+ "Romanian (Romania)",
+ "Russian (Russia)",
+ "Serbian (Latin, Serbia)",
+ "Sinhala (Sri Lanka)",
+ "Slovak (Slovakia)",
+ "Slovenian (Slovenia)",
+ "Somali (Somalia)",
+ "Spanish (Argentina)",
+ "Spanish (Bolivia)",
+ "Spanish (Chile)",
+ "Spanish (Colombia)",
+ "Spanish (Costa Rica)",
+ "Spanish (Cuba)",
+ "Spanish (Dominican Republic)",
+ "Spanish (Ecuador)",
+ "Spanish (El Salvador)",
+ "Spanish (Equatorial Guinea)",
+ "Spanish (Guatemala)",
+ "Spanish (Honduras)",
+ "Spanish (Mexico)",
+ "Spanish (Nicaragua)",
+ "Spanish (Panama)",
+ "Spanish (Paraguay)",
+ "Spanish (Peru)",
+ "Spanish (Puerto Rico)",
+ "Spanish (Spain)",
+ "Spanish (United States)",
+ "Spanish (Uruguay)",
+ "Spanish (Venezuela)",
+ "Sundanese (Indonesia)",
+ "Swahili (Kenya)",
+ "Swahili (Tanzania)",
+ "Swedish (Sweden)",
+ "Tamil (India)",
+ "Tamil (Malaysia)",
+ "Tamil (Singapore)",
+ "Tamil (Sri Lanka)",
+ "Telugu (India)",
+ "Thai (Thailand)",
+ "Turkish (T\u00fcrkiye)",
+ "Ukrainian (Ukraine)",
+ "Urdu (India)",
+ "Urdu (Pakistan)",
+ "Uzbek (Latin, Uzbekistan)",
+ "Vietnamese (Vietnam)",
+ "Welsh (United Kingdom)",
+ "Zulu (South Africa)",
+ "English - Your Accent",
+ "English - American Accent"
+ ]
+ },
+ "badges": [
+ "fast"
+ ],
+ "pricing": {
+ "unit": "second",
+ "usd": 0.05
+ }
+ },
+ {
+ "id": "elevenlabs-dubbing",
+ "name": "ElevenLabs Dubbing",
+ "vendor": "ElevenLabs",
+ "family": "elevenlabs",
+ "engine": "cloud",
+ "kind": "video",
+ "tagline": "Dub video or audio while keeping each speaker's voice",
+ "routes": [
+ {
+ "op": "dub",
+ "provider": "fal",
+ "endpoint": "fal-ai/elevenlabs/dubbing",
+ "map": {
+ "prompt": false,
+ "targetLanguage": "target_lang",
+ "video": "video_url",
+ "audio": "audio_url"
+ }
+ }
+ ],
+ "options": {
+ "languages": [
+ "en",
+ "es",
+ "fr",
+ "de",
+ "it",
+ "pt",
+ "pl",
+ "hi",
+ "ja",
+ "ko",
+ "zh",
+ "ar",
+ "ru",
+ "tr",
+ "nl",
+ "sv",
+ "id",
+ "fil",
+ "uk",
+ "el",
+ "cs",
+ "ro",
+ "da",
+ "fi",
+ "bg",
+ "hr",
+ "sk",
+ "ms",
+ "ta",
+ "vi",
+ "hu",
+ "no"
+ ]
+ },
+ "pricing": {
+ "unit": "minute",
+ "usd": 0.6
+ }
+ },
{
"id": "elevenlabs-sfx",
"name": "ElevenLabs Sound Effects",
diff --git a/src/lib/catalog/elements.ts b/src/lib/catalog/elements.ts
index a4381e19..70cb80f2 100644
--- a/src/lib/catalog/elements.ts
+++ b/src/lib/catalog/elements.ts
@@ -5,13 +5,14 @@
*/
import type { Engine, GenerationRequest, LoraRef, ModelDef, Operation } from "./types";
-export type ElementKind = "character" | "location" | "prop" | "style";
+export type ElementKind = "character" | "location" | "prop" | "style" | "voice";
export const ELEMENT_KINDS: { kind: ElementKind; label: string; plural: string; noun: string; refs: number }[] = [
{ kind: "character", label: "Character", plural: "Characters", noun: "the person", refs: 3 },
{ kind: "location", label: "Location", plural: "Locations", noun: "the location", refs: 2 },
{ kind: "prop", label: "Prop", plural: "Props", noun: "the object", refs: 1 },
{ kind: "style", label: "Style", plural: "Styles", noun: "the visual style", refs: 2 },
+ { kind: "voice", label: "Voice", plural: "Voices", noun: "the voice", refs: 0 },
];
export const elementKindInfo = (k: ElementKind) => ELEMENT_KINDS.find((x) => x.kind === k) ?? ELEMENT_KINDS[0];
@@ -92,7 +93,9 @@ const ops = (m: ModelDef) => new Set(m.routes.map((r) => r.op));
export function applyMentions(req: GenerationRequest, model: ModelDef, elements: StudioElement[]): MentionResolution {
// Shots (multi-shot) can mention elements too.
const shots = req.params?.shots;
- const mentioned = findMentions([req.prompt ?? "", ...(shots ?? []).map((s) => s.prompt)].join("\n"), elements);
+ // Voices are picked in the voice menu, not mentioned in visual prompts.
+ const visual = elements.filter((e) => e.kind !== "voice");
+ const mentioned = findMentions([req.prompt ?? "", ...(shots ?? []).map((s) => s.prompt)].join("\n"), visual);
if (!mentioned.length) return { request: req, mentioned, notes: [] };
const notes: string[] = [];
diff --git a/src/lib/catalog/payload.ts b/src/lib/catalog/payload.ts
index bac9cdff..83aa3bb6 100644
--- a/src/lib/catalog/payload.ts
+++ b/src/lib/catalog/payload.ts
@@ -5,6 +5,14 @@ function enumValue(field: string | EnumField, value: string): [string, unknown]
return [field.key, field.values && value in field.values ? field.values[value] : value];
}
+/** Write `a.b.c` as nested objects (MiniMax's voice_setting.voice_id etc.). */
+function setPath(out: Record<string, unknown>, key: string, value: unknown) {
+ const parts = key.split(".");
+ let o = out;
+ for (const k of parts.slice(0, -1)) o = (o[k] ??= {}) as Record<string, unknown>;
+ o[parts[parts.length - 1]] = value;
+}
+
/** Build a provider payload from canonical input using a route's {@link FieldMap}. Pure + unit-tested. */
export function buildPayload(map: FieldMap, input: GenInput): Record<string, unknown> {
const out: Record<string, unknown> = {};
@@ -58,6 +66,14 @@ export function buildPayload(map: FieldMap, input: GenInput): Record<string, unk
if (ms.flag) out[ms.flag] = true;
}
if (map.draft && input.draft) out[map.draft] = true;
+ // Voices, dialogue and dubbing.
+ if (map.voice && input.voice) setPath(out, map.voice, input.voice);
+ if (map.voiceAudio && input.voiceAudio) out[map.voiceAudio] = input.voiceAudio;
+ if (map.dialogue && input.dialogue?.length) {
+ const d = map.dialogue;
+ out[d.key] = input.dialogue.map((l) => ({ [d.text]: l.text, [d.voice]: l.voice ?? input.voice }));
+ }
+ if (map.targetLanguage && input.targetLanguage) out[map.targetLanguage] = input.targetLanguage;
if (map.draftId && input.draftId) out[map.draftId] = input.draftId;
Object.assign(out, map.fixed ?? {});
diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.ts
index c4ae69f9..c0a56a04 100644
--- a/src/lib/catalog/plan.ts
+++ b/src/lib/catalog/plan.ts
@@ -86,6 +86,12 @@ export interface Plan {
perJobOutputs: number;
}
+/** Operations that work from their inputs alone. */
+const PROMPTLESS = new Set<Operation>([
+ "finalize", "reframe", "dialogue", "voice-change", "dub", "upscale-image", "upscale-video", "bg-remove",
+ "interpolate", "v2a", "face-swap", "motion-transfer", "lipsync", "avatar",
+]);
+
export function planGeneration(
req: GenerationRequest,
getModel: (id: string) => ModelDef | undefined,
@@ -139,7 +145,13 @@ export function planGeneration(
throw new Error(`${model.name} can't do ${op} — try another model`);
}
if (op === "finalize" && !params.draftId) throw new Error("Pick a draft to finish");
- if (!prompt && op !== "finalize" && op !== "reframe" && op !== "upscale-image" && op !== "upscale-video" && op !== "bg-remove" && op !== "interpolate" && op !== "v2a" && op !== "face-swap" && op !== "motion-transfer" && op !== "lipsync" && op !== "avatar") {
+ if (op === "dialogue" && !params.dialogue?.some((l) => l.text.trim())) throw new Error("Write at least one line");
+ if (op === "dub" && !params.targetLanguage) throw new Error("Pick a language to translate into");
+ if ((op === "tts" || op === "voice-change") && model.options.voiceClone && !model.options.voices?.length && !req.inputs?.voiceAudio) {
+ throw new Error(op === "tts" ? "Pick or record the voice to speak with" : "Pick or record the voice to change into");
+ }
+ if (op === "dub" && !req.inputs?.video && !req.inputs?.audio) throw new Error("Add the video to translate");
+ if (!prompt && !PROMPTLESS.has(op)) {
throw new Error("Write a prompt first");
}
@@ -174,6 +186,7 @@ const NEEDS: Partial<Record<Operation, { images?: number; video?: boolean; audio
interpolate: { video: true, msg: "Add a video" },
extend: { video: true, msg: "Add the video to continue" },
reframe: { video: true, msg: "Add a video to reframe" },
+ "voice-change": { audio: true, msg: "Add the recording to re-voice" },
};
/** Human message for the first missing input of an operation, or null. */
diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.ts
index dca235d9..b3745616 100644
--- a/src/lib/catalog/types.ts
+++ b/src/lib/catalog/types.ts
@@ -37,7 +37,10 @@ export type Operation =
| "extend" // video → the same clip, continued
| "grade" // colour grade, rendered in the browser
| "reframe" // video → same video at a new aspect ratio (AI-filled edges)
- | "finalize"; // draft video → full-quality render of the same take
+ | "finalize" // draft video → full-quality render of the same take
+ | "dialogue" // several speakers → one audio track
+ | "voice-change" // speech audio → the same speech in another voice
+ | "dub"; // video (or audio) → translated, re-voiced and lip-synced
export const OPERATION_LABELS: Record<Operation, string> = {
t2i: "Text to image",
@@ -65,6 +68,9 @@ export const OPERATION_LABELS: Record<Operation, string> = {
grade: "Color grade",
reframe: "Reframe",
finalize: "Final render",
+ dialogue: "Dialogue",
+ "voice-change": "Voice change",
+ dub: "Translate & dub",
};
export const OPERATION_OUTPUT: Record<Operation, MediaKind> = {
@@ -93,6 +99,9 @@ export const OPERATION_OUTPUT: Record<Operation, MediaKind> = {
grade: "image",
reframe: "video",
finalize: "video",
+ dialogue: "audio",
+ "voice-change": "audio",
+ dub: "video",
};
export type ProviderId = "fal" | "replicate" | "higgsfield" | "openai" | "google" | "comfyui" | "mock" | "local";
@@ -140,6 +149,14 @@ export interface FieldMap {
seedRange?: [number, number];
/** Boolean field, or an on/off enum such as Kling's `sound: "on" | "off"`. */
generateAudio?: string | { key: string; on: unknown; off: unknown };
+ /** Premade voice name / id (ElevenLabs `voice`). Dotted keys write nested fields. */
+ voice?: string;
+ /** Reference clip to clone a voice from (zero-shot TTS) or to convert into (voice change). */
+ voiceAudio?: string;
+ /** Multi-speaker lines: an array of {text, voice}. */
+ dialogue?: { key: string; text: string; voice: string };
+ /** Language to translate into (dubbing). */
+ targetLanguage?: string;
/** Native multi-shot: an array of {prompt, duration} (Kling's `multi_prompt`). */
multiShot?: { key: string; durationType: "string" | "number"; json?: boolean; shotType?: string; flag?: string };
/** Boolean draft switch (Seedance 2.5 renders a cheap 480p take and returns a draft id). */
@@ -181,6 +198,14 @@ export interface ModelOptions {
draft?: boolean;
/** A style/template list fetched from the provider (Soul styles, Genjutsu looks, Marketing Studio templates). */
presets?: { source: string; param: string; label: string; required?: boolean };
+ /** Premade voices the model offers (shown in the voice picker). */
+ voices?: { id: string; name: string; hint?: string }[];
+ /** Takes a reference recording to clone a voice from. */
+ voiceClone?: boolean;
+ /** Languages it can translate into. */
+ languages?: string[];
+ /** Numeric settings sent as-is (stability, similarity, speed, exaggeration…). */
+ sliders?: { param: string; label: string; min: number; max: number; step: number; default: number }[];
/** Extra enum settings sent as-is (Cinema Studio's genre, lens, light, grade, camera move…). */
controls?: { param: string; label: string; values: (string | number)[]; default?: string | number }[];
}
@@ -202,7 +227,7 @@ export interface ModelDef {
badges?: Badge[];
routes: ModelRoute[];
options: ModelOptions;
- defaults?: Partial<Pick<GenParams, "aspectRatio" | "resolution" | "duration" | "numOutputs" | "generateAudio">>;
+ defaults?: Partial<Pick<GenParams, "aspectRatio" | "resolution" | "duration" | "numOutputs" | "generateAudio" | "voice">>;
pricing?: Pricing;
/** Trained identities this model accepts by id (Higgsfield Soul ID). */
identity?: { provider: "higgsfield"; version: "v1" | "v2" | "cinema" };
@@ -219,6 +244,12 @@ export interface GenParams {
seed?: number;
generateAudio?: boolean;
enhancePrompt?: boolean;
+ /** Premade voice (TTS, voice change). */
+ voice?: string;
+ /** Dialogue lines, each with its own voice. */
+ dialogue?: { text: string; voice?: string }[];
+ /** Dubbing target language. */
+ targetLanguage?: string;
/** Multi-shot: shots in order (empty/undefined = one shot). "auto" lets the model cut by itself. */
shots?: { prompt: string; duration: number }[];
multiShot?: "auto";
@@ -256,6 +287,8 @@ export interface GenerationRequest {
sketch?: string;
video?: string;
audio?: string;
+ /** Reference recording of the voice to speak with / convert into. */
+ voiceAudio?: string;
};
params?: GenParams;
/** Values for preset option pickers (apps). */
@@ -273,6 +306,7 @@ export interface GenInput extends GenParams {
mask?: string;
video?: string;
audio?: string;
+ voiceAudio?: string;
loras?: LoraRef[];
}
@@ -315,7 +349,7 @@ export interface Generation {
/** Input slot a preset asks the user for. */
export interface InputSlot {
- key: "image" | "image2" | "image3" | "endImage" | "video" | "audio" | "mask" | "sketch";
+ key: "image" | "image2" | "image3" | "endImage" | "video" | "audio" | "mask" | "sketch" | "voiceAudio";
label: string;
hint?: string;
accept: MediaKind;
diff --git a/src/lib/studios.ts b/src/lib/studios.ts
index adeb7de4..df37282b 100644
--- a/src/lib/studios.ts
+++ b/src/lib/studios.ts
@@ -124,13 +124,85 @@ export const AUDIO_STUDIO: StudioConfig = {
feature: "audio",
title: "Audio",
hero: "Give it a voice",
- placeholder: "What should it say, or what should it sound like?",
+ subtitle: "Premade ElevenLabs voices, or clone any voice from a 10-second sample.",
+ placeholder: "What should it say? Try ElevenLabs v3 audio tags like [whispers] or [laughs]",
kind: "audio",
- ops: ["tts", "sfx", "music"],
+ ops: ["tts"],
feed: { kind: "audio", features: ["audio"] },
slots: [],
- defaultModels: { cloud: "elevenlabs-tts", open: "oss-ace-step" },
- suggestions: ["Welcome to Fuobe — make anything, with any model.", "Thunder rolling over a quiet forest", "Lo-fi hip hop beat with soft piano, 80 bpm"],
+ defaultModels: { cloud: "elevenlabs-v4", open: "" },
+ suggestions: ["Welcome to Fuobe — make anything, with any model.", "[whispers] Don't look now… but I think it's following us.", "Breaking news: the robots have learned to paint."],
+};
+
+export const DIALOGUE_STUDIO: StudioConfig = {
+ feature: "audio",
+ title: "Audio",
+ hero: "Write a conversation",
+ subtitle: "Every line gets its own voice; the model handles timing, interruptions and tone.",
+ placeholder: "",
+ kind: "audio",
+ ops: ["dialogue"],
+ feed: { kind: "audio", features: ["audio"] },
+ slots: [],
+ defaultModels: { cloud: "elevenlabs-dialogue", open: "" },
+ promptOptional: true,
+ hidePrompt: true,
+};
+
+export const VOICE_CHANGE_STUDIO: StudioConfig = {
+ feature: "audio",
+ title: "Audio",
+ hero: "Say it in another voice",
+ subtitle: "Keeps your timing and emotion, swaps the voice.",
+ placeholder: "",
+ kind: "audio",
+ ops: ["voice-change"],
+ feed: { kind: "audio", features: ["audio"] },
+ slots: [{ key: "audio", label: "Recording", accept: "audio", required: true }],
+ defaultModels: { cloud: "elevenlabs-voice-changer", open: "" },
+ promptOptional: true,
+ hidePrompt: true,
+};
+
+export const TRANSLATE_STUDIO: StudioConfig = {
+ feature: "translate",
+ title: "Audio",
+ hero: "Speak every language",
+ subtitle: "Translates the speech, keeps each speaker's voice and re-syncs the lips.",
+ placeholder: "",
+ kind: "video",
+ ops: ["dub"],
+ feed: { features: ["translate"] },
+ slots: [{ key: "video", label: "Video", accept: "video", required: true }],
+ defaultModels: { cloud: "heygen-translate", open: "" },
+ promptOptional: true,
+ hidePrompt: true,
+};
+
+export const SFX_STUDIO: StudioConfig = {
+ feature: "audio",
+ title: "Audio",
+ hero: "Describe a sound",
+ placeholder: "e.g. “thunder rolling over a quiet forest, rain on leaves”",
+ kind: "audio",
+ ops: ["sfx"],
+ feed: { kind: "audio", features: ["audio"] },
+ slots: [],
+ defaultModels: { cloud: "elevenlabs-sfx", open: "" },
+ suggestions: ["Thunder rolling over a quiet forest", "Footsteps on gravel, distant birds", "Sci-fi door whooshing open"],
+};
+
+export const MUSIC_STUDIO: StudioConfig = {
+ feature: "audio",
+ title: "Audio",
+ hero: "What should it sound like?",
+ placeholder: "Genre, mood, instruments, tempo — add lyrics on new lines",
+ kind: "audio",
+ ops: ["music"],
+ feed: { kind: "audio", features: ["audio"] },
+ slots: [],
+ defaultModels: { cloud: "elevenlabs-music", open: "oss-ace-step" },
+ suggestions: ["Lo-fi hip hop beat with soft piano, 80 bpm", "Epic orchestral trailer music building to a drop", "Upbeat indie pop with handclaps and a whistled hook"],
};
export const FOLEY_STUDIO: StudioConfig = {
diff --git a/src/server/generations.ts b/src/server/generations.ts
index ccc3c6cb..43b5b87f 100644
--- a/src/server/generations.ts
+++ b/src/server/generations.ts
@@ -262,6 +262,7 @@ async function submit(
mask: await prepMask(req.inputs?.mask),
video: await prep(req.inputs?.video),
audio: await prep(req.inputs?.audio),
+ voiceAudio: await prep(req.inputs?.voiceAudio),
loras: plan.loras,
// Vary seeds across a batch so N jobs don't return N identical results.
seed: plan.params.seed !== undefined && plan.params.seed >= 0 ? plan.params.seed + index : undefined,
diff --git a/tests/audio.test.ts b/tests/audio.test.ts
new file mode 100644
index 00000000..0809c855
--- /dev/null
+++ b/tests/audio.test.ts
@@ -0,0 +1,49 @@
+import { describe, expect, it } from "vitest";
+import { getModel, getPreset } from "@/lib/catalog";
+import { buildPayload } from "@/lib/catalog/payload";
+import { planGeneration } from "@/lib/catalog/plan";
+
+const route = (id: string, op?: string) => getModel(id)!.routes.find((r) => !op || r.op === op)!;
+
+describe("audio", () => {
+ it("offers ElevenLabs premade voices by id, with sliders from the schema", () => {
+ const m = getModel("elevenlabs-v4")!;
+ expect(m.options.voices?.find((v) => v.name === "Daniel")?.id).toBe("onwK4e9ZLuTAKqWW03F9");
+ expect(m.options.sliders?.map((s) => s.param)).toEqual(expect.arrayContaining(["stability", "similarity_boost"]));
+ expect(buildPayload(route("elevenlabs-v4").map!, { prompt: "Hi", voice: "onwK4e9ZLuTAKqWW03F9", extra: { stability: 0.3 } })).toEqual({
+ text: "Hi",
+ voice: "onwK4e9ZLuTAKqWW03F9",
+ stability: 0.3,
+ });
+ });
+
+ it("clones from a reference recording for zero-shot TTS and voice conversion", () => {
+ expect(buildPayload(route("chatterbox-cloud").map!, { prompt: "Hi", voiceAudio: "https://me.wav" })).toMatchObject({ text: "Hi", audio_url: "https://me.wav" });
+ expect(buildPayload(route("chatterbox-vc-cloud").map!, { audio: "https://src.wav", voiceAudio: "https://target.wav" })).toEqual({
+ source_audio_url: "https://src.wav",
+ target_voice_audio_url: "https://target.wav",
+ });
+ expect(() => planGeneration({ feature: "audio", modelId: "chatterbox-cloud", prompt: "Hi" }, getModel, getPreset)).toThrow(/voice to speak with/);
+ });
+
+ it("sends dialogue lines with one voice each", () => {
+ const plan = planGeneration(
+ { feature: "audio", modelId: "elevenlabs-dialogue", params: { dialogue: [{ text: "Hey", voice: "a" }, { text: "Hi" }] } },
+ getModel,
+ getPreset,
+ );
+ expect(plan.op).toBe("dialogue");
+ expect(buildPayload(route("elevenlabs-dialogue").map!, { ...plan.params }).inputs).toEqual([
+ { text: "Hey", voice: "a" },
+ { text: "Hi", voice: "JBFqnCBsd6RMkjVDRZzb" },
+ ]);
+ expect(() => planGeneration({ feature: "audio", modelId: "elevenlabs-dialogue", params: { dialogue: [{ text: " " }] } }, getModel, getPreset)).toThrow(/one line/);
+ });
+
+ it("translates video into a target language", () => {
+ expect(getModel("heygen-translate")!.options.languages).toContain("Japanese (Japan)");
+ expect(() => planGeneration({ feature: "translate", modelId: "heygen-translate", inputs: { video: "/v.mp4" } }, getModel, getPreset)).toThrow(/language/);
+ const plan = planGeneration({ feature: "translate", modelId: "heygen-translate", inputs: { video: "/v.mp4" }, params: { targetLanguage: "Spanish" } }, getModel, getPreset);
+ expect(buildPayload(route("heygen-translate").map!, { ...plan.params, video: "https://v.mp4" })).toEqual({ video_url: "https://v.mp4", output_language: "Spanish" });
+ });
+});