The open-source AI voice studio. Clone, dictate, create.
fix(tts): serialize VoiceDesign model loading, persist designed drafts
Lvigentini81f40d2e7138
diff --git a/README.md b/README.mdindex bf845321..aad3e531 100644--- a/README.md+++ b/README.md@@ -373,7 +373,7 @@ Full API documentation available at `http://127.0.0.1:17493/docs`.| Frontend | React, TypeScript, Tailwind CSS || State | Zustand, React Query || Backend | FastAPI (Python) |-| TTS Engines | Qwen3-TTS, Qwen CustomVoice, LuxTTS, Chatterbox, Chatterbox Turbo, TADA, Kokoro |+| TTS Engines | Qwen3-TTS, Qwen CustomVoice, Qwen VoiceDesign, LuxTTS, Chatterbox, Chatterbox Turbo, TADA, Kokoro || STT | Whisper / Whisper Turbo (PyTorch or MLX) || Local LLM | Qwen3 (0.6B / 1.7B / 4B), shared runtime with TTS / STT || MCP Server | FastMCP mounted at `/mcp` (Streamable HTTP) + bundled stdio shim binary |diff --git a/app/src/components/VoiceProfiles/ProfileForm.tsx b/app/src/components/VoiceProfiles/ProfileForm.tsxindex eda4ca7b..3272f214 100644--- a/app/src/components/VoiceProfiles/ProfileForm.tsx+++ b/app/src/components/VoiceProfiles/ProfileForm.tsx@@ -360,6 +360,10 @@ export function ProfileForm() {avatarFile: undefined,});setSampleMode(profileFormDraft.sampleMode);+ // Reopen in the mode the draft was written in, otherwise a designed+ // draft comes back as a clone with its description dropped.+ setVoiceSource(profileFormDraft.voiceSource ?? 'clone');+ setDesignPrompt(profileFormDraft.designPrompt ?? '');// Restore the file if we have it savedif (profileFormDraft.sampleFileData &&@@ -810,7 +814,11 @@ export function ProfileForm() {// Save draft when closing the create modalconst values = form.getValues();const hasContent =- values.name || values.description || values.referenceText || values.sampleFile;+ values.name ||+ values.description ||+ values.referenceText ||+ values.sampleFile ||+ designPrompt.trim();if (hasContent) {const draft: ProfileFormDraft = {@@ -820,6 +828,8 @@ export function ProfileForm() {personality: values.personality || '',referenceText: values.referenceText || '',sampleMode,+ voiceSource,+ designPrompt,};// Save file as base64 if presentdiff --git a/app/src/stores/uiStore.ts b/app/src/stores/uiStore.tsindex dfaf6d2f..2af00409 100644--- a/app/src/stores/uiStore.ts+++ b/app/src/stores/uiStore.ts@@ -22,6 +22,10 @@ export interface ProfileFormDraft {personality: string;referenceText: string;sampleMode: 'upload' | 'record' | 'system';+ /** Which creation mode was open, so a restored draft reopens as itself. */+ voiceSource?: 'clone' | 'builtin' | 'design';+ /** Voice description for a designed profile. */+ designPrompt?: string;// Note: File objects can't be persisted, so we store metadatasampleFileName?: string;sampleFileType?: string;diff --git a/backend/backends/qwen_voice_design_backend.py b/backend/backends/qwen_voice_design_backend.pyindex 853560a0..ba02efba 100644--- a/backend/backends/qwen_voice_design_backend.py+++ b/backend/backends/qwen_voice_design_backend.py@@ -52,6 +52,10 @@ class QwenVoiceDesignBackend:self.model_size = model_sizeself.device = self._get_device()self._current_model_size: Optional[str] = None+ # Without this, two concurrent generations can both see model is None+ # and each load the 3.5 GB checkpoint. Same pattern as the Chatterbox+ # and TADA backends.+ self._model_load_lock = asyncio.Lock()def _get_device(self) -> str:return get_torch_device(allow_xpu=True, allow_directml=True)@@ -75,10 +79,16 @@ class QwenVoiceDesignBackend:if self.model is not None and self._current_model_size == model_size:return- if self.model is not None and self._current_model_size != model_size:- self.unload_model()+ async with self._model_load_lock:+ # Re-check: another request may have finished loading while this+ # one waited for the lock.+ if self.model is not None and self._current_model_size == model_size:+ return- await asyncio.to_thread(self._load_model_sync, model_size)+ if self.model is not None and self._current_model_size != model_size:+ self.unload_model()++ await asyncio.to_thread(self._load_model_sync, model_size)# Alias for compatibility with the TTSBackend protocolload_model = load_model_asyncdiff --git a/docs/PROJECT_STATUS.md b/docs/PROJECT_STATUS.mdindex 60caae3b..ff15c087 100644--- a/docs/PROJECT_STATUS.md+++ b/docs/PROJECT_STATUS.md@@ -687,7 +687,7 @@ The generation form now uses a flat model dropdown with engine-based routing. Pe### 7. Engine Sprawl — NEW-Seven TTS engines shipped, more candidates queued. Issue #419 asks for a first-class vs experimental distinction. Related: issue #420 asks for formalized platform support tiers. Combined, these would let us ship more engines more confidently with clearer expectations for users.+Eight TTS engines shipped, more candidates queued. Issue #419 asks for a first-class vs experimental distinction. Related: issue #420 asks for formalized platform support tiers. Combined, these would let us ship more engines more confidently with clearer expectations for users.---diff --git a/docs/content/docs/developer/model-management.mdx b/docs/content/docs/developer/model-management.mdxindex ea308f1e..6572484b 100644--- a/docs/content/docs/developer/model-management.mdx+++ b/docs/content/docs/developer/model-management.mdx@@ -7,7 +7,7 @@ description: "How model downloading, loading, and status tracking works across aVoicebox manages two categories of models:-**TTS Models** — Seven engines covering zero-shot cloning and preset voices. Each engine may have one or more size variants.+**TTS Models** — Eight engines covering zero-shot cloning, preset voices and voice design. Each engine may have one or more size variants.**ASR Models** — Whisper for transcription. Five sizes, plus MLX-Whisper on Apple Silicon for ~8× faster transcription.diff --git a/docs/content/docs/developer/tts-generation.mdx b/docs/content/docs/developer/tts-generation.mdxindex 0f685622..4e2b9d0c 100644--- a/docs/content/docs/developer/tts-generation.mdx+++ b/docs/content/docs/developer/tts-generation.mdx@@ -5,7 +5,7 @@ description: "How text-to-speech generation works across Voicebox's multi-engine## Overview-Voicebox ships seven TTS engines — Qwen3-TTS, Qwen CustomVoice, LuxTTS, Chatterbox Multilingual, Chatterbox Turbo, TADA, and Kokoro — behind a single `TTSBackend` Protocol. All of them expose the same async interface so the routes and services don't need per-engine branching.+Voicebox ships eight TTS engines — Qwen3-TTS, Qwen CustomVoice, Qwen VoiceDesign, LuxTTS, Chatterbox Multilingual, Chatterbox Turbo, TADA, and Kokoro — behind a single `TTSBackend` Protocol. All of them expose the same async interface so the routes and services don't need per-engine branching.This page covers how generation flows through that abstraction. For the step-by-step guide to adding a new engine, see [TTS Engines](/developer/tts-engines).diff --git a/docs/content/docs/overview/introduction.mdx b/docs/content/docs/overview/introduction.mdxindex 155bdb41..0a1f53a1 100644--- a/docs/content/docs/overview/introduction.mdx+++ b/docs/content/docs/overview/introduction.mdx@@ -46,12 +46,13 @@ shared between input and output.## TTS Engines-Seven engines with different strengths, switchable per-generation:+Eight engines with different strengths, switchable per-generation:| Engine | Profile Type | Languages | Strengths ||--------|--------------|-----------|-----------|| **Qwen3-TTS** (0.6B / 1.7B) | Cloned | 10 | High-quality multilingual cloning || **Qwen CustomVoice** (0.6B / 1.7B) | Preset (9 voices) | 10 | Natural-language delivery control (tone, emotion, pace) |+| **Qwen VoiceDesign** (1.7B) | Designed | 10 | Builds a voice from a written description — no reference audio or preset || **LuxTTS** | Cloned | English | Lightweight (~1GB VRAM), 48kHz output, 150x realtime on CPU || **Chatterbox Multilingual** | Cloned | 23 | Broadest language coverage || **Chatterbox Turbo** | Cloned | English | Fast 350M model with paralinguistic emotion/sound tags |diff --git a/landing/src/app/page.tsx b/landing/src/app/page.tsxindex 4a3173cd..189bb93b 100644--- a/landing/src/app/page.tsx+++ b/landing/src/app/page.tsx@@ -83,7 +83,7 @@ export default function Home() {className="fade-in mx-auto mt-6 max-w-2xl text-lg text-muted-foreground md:text-xl"style={{animationDelay: "200ms"}}>- Clone voices, generate speech across seven TTS engines, dictate into+ Clone voices, generate speech across eight TTS engines, dictate intoany app, and talk to agents in voices you own. A free and local alternativeto ElevenLabs and WisprFlow, running{" "}<b className="text-white">entirely on your machine.</b>