* fix(history): populate status/error/engine/model_size/is_favorited from DB
GET /history/{generation_id} was constructing HistoryResponse without
passing status, error, engine, model_size, or is_favorited from the
DB row. Since HistoryResponse.status defaults to "completed" in the
Pydantic model (models.py:141), this endpoint returned
status="completed" for every generation regardless of the actual DB
state — including jobs still in "loading_model" or "generating", and
even "failed" jobs.
This breaks any client polling /history/{id} for job completion:
the API lies about the status, so the only trustworthy success
signal becomes `audio_path` being non-empty. All other fields left
at their model defaults were similarly masked.
Fix: pass all fields through from the DB row, matching the pattern
used elsewhere in the codebase. The DB model (Generation in
database/models.py) already has all these columns.
* fix(history): apply NULL fallbacks to match list endpoint
Align the defensive mappings with services/history.py:206-223 so
both the single-item and list history endpoints handle legacy rows
with NULL status/engine/is_favorited identically. Without this,
HistoryResponse's non-Optional str/bool fields would raise a
pydantic ValidationError (500) on any row where these columns are
NULL — possible from direct SQL updates or past migrations.
Addresses review feedback on PR #394.
---------
Co-authored-by: malletfils <[email protected]>
Two small safety improvements:
1. Voice prompt cache (cache.py): add weights_only=True to torch.load()
so cached .prompt files are loaded using the safe unpickler instead of
the unrestricted pickle deserializer. This follows the PyTorch 2.6+
best practice of opting in to safe loading for all torch.load() calls.
2. SPA catch-all (app.py): replace str.startswith() path guard with
Path.is_relative_to(). The string prefix check passes for sibling
paths like /app/frontend_evil/ that share the /app/frontend prefix.
is_relative_to() correctly tests directory containment.
Follow-up to #361. The original fallback silently mapped unknown numpy
dtypes to torch.float32, which would reinterpret the memcpy'd bytes in
the wrong dtype and corrupt data (e.g. fp16 tensors from some TTS
engines) rather than erroring loudly.
- Hoist dtype_map out of the inner function so it's built once
- Add float16, complex64, complex128 mappings
- Raise TypeError on unknown dtype instead of silent float32 fallback
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
torch is compiled against numpy 1.x. numpy 2.x changed the ABI version
returned by PyArray_GetNDArrayCVersion() (0x01000009 → 0x02000000), so
torch's is_numpy_available() always returns False and torch.from_numpy()
raises RuntimeError. This causes TTS generation to fail with:
ValueError: Unable to create tensor, you should probably activate
padding with 'padding=True'
Two fixes:
1. Pin numpy<2.0 in requirements.txt so new builds bundle a compatible
numpy version. (The existing comment already flagged this intention
but the upper bound was never added.)
2. Add a PyInstaller runtime hook (pyi_rth_numpy_compat.py) that installs
a ctypes memmove fallback for torch.from_numpy() at startup. Runtime
hooks run after FrozenImporter is registered so frozen torch is
importable. The fallback catches RuntimeError from the C-level ABI
check and copies the numpy array into a new tensor via raw memory copy,
bypassing the check entirely. This is a belt-and-suspenders fix that
works regardless of the bundled numpy version.
Co-authored-by: aimaaaimaa <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
- Rust: Replace fragile body.contains("status") with proper JSON
deserialization validating status=="healthy", model_loaded (bool),
and gpu_available (bool) to prevent misidentifying non-Voicebox services
- Frontend: Validate health response has Voicebox-specific fields before
marking server as ready during fallback polling
- Frontend: Discriminate port-in-use errors (poll for external server) from
real startup failures (missing sidecar, signing issues) — surface errors
immediately with a startupError state and Retry button in the UI
- Frontend: Set explicit startup-error state when 2-minute polling timeout
expires so the loading screen shows actionable feedback instead of hanging
- Architecture: Extract QueryClient to standalone side-effect-free module
(lib/queryClient.ts) to decouple serverStore from React bootstrap entrypoint
Add Kokoro-82M as a new TTS engine — 82M params, CPU realtime, 8 languages,
Apache 2.0. Unlike cloning engines, Kokoro uses pre-built voice styles, which
required a new profile type system to support non-cloning engines cleanly.
Kokoro engine:
- New kokoro_backend.py implementing TTSBackend protocol
- 50 built-in voices across en/es/fr/hi/it/pt/ja/zh
- KPipeline API with language-aware G2P routing via misaki
- PyInstaller bundling for misaki, language_tags, espeakng_loader, en_core_web_sm
Voice profile type system:
- New voice_type column: 'cloned' | 'preset' | 'designed' (future)
- Preset profiles store engine + voice ID instead of audio samples
- default_engine field on profiles — auto-selects engine on profile pick
- Create Voice dialog: toggle between 'Clone from audio' and 'Built-in voice'
- Edit dialog shows preset voice info instead of sample list for preset profiles
- Engine selector locks to preset engine when preset profile is selected
- Profile grid filters by engine — shows Kokoro voices when Kokoro selected
- Custom empty state when no preset profiles exist for selected engine
Bug fixes:
- Fix relative audio paths in DB causing 404s in production builds
- config.set_data_dir() now resolves to absolute paths
- Startup migration converts existing relative paths to absolute
Also updates PROJECT_STATUS.md and tts-engines.mdx developer guide.
Address CodeRabbit review feedback and user-reported GPU acceleration failure:
- Use shared manual_seed() in chatterbox, chatterbox_turbo, and luxtts
backends so XPU (and future accelerators) get proper device seeding
- Add XPU branch to _get_gpu_status() so startup log reports Intel Arc
GPUs instead of 'None (CPU only)'
- Add XPU VRAM reporting and correct backend_variant fallback in the
/health endpoint
- Switch justfile GPU detection from Get-WmiObject to Get-CimInstance,
simplify the Arc regex to match 'Arc' (not 'Intel.*Arc'), log
detected GPUs, and print manual install instructions on miss
Resolves the root cause where IPEX was silently not installed due to
WMI detection failure, causing CPU-only fallback on Intel Arc systems.
Auto-detect Intel Arc GPUs during Windows setup and install PyTorch
with XPU support + intel-extension-for-pytorch. Enable allow_xpu=True
on all TTS backends (Chatterbox, Chatterbox Turbo, Hume TADA, LuxTTS)
that previously only supported CUDA. Add shared empty_device_cache()
and manual_seed() helpers in base.py to handle XPU memory management
and reproducible seeding alongside CUDA.
Two fixes for issue #312:
1. GUI stuck on loading screen when backend is already running externally
(e.g. via python/uvicorn/Docker):
- Rust: add HTTP health check fallback when the process on the port
doesn't have 'voicebox' in its name. If /health responds with a
valid Voicebox response, reuse the server instead of erroring.
- Frontend: when startServer() fails, fall back to polling the
health endpoint every 2s instead of permanently blocking.
2. No data refresh when switching server URLs in settings:
- serverStore.setServerUrl() now invalidates all React Query caches
when the URL actually changes, so profiles/history/models/stories
are re-fetched from the new server.
- Export queryClient from main.tsx for store-level cache invalidation.
Fixes#312
Qwen TTS and Whisper Base make network calls to HuggingFace even when
model weights are fully cached locally, because from_pretrained()
defaults to local_files_only=False. This causes failures for offline
users.
Add a reusable force_offline_if_cached() context manager that sets
HF_HUB_OFFLINE=1 during model loading when is_model_cached() is True.
Applied to all four affected load paths:
- PyTorchTTSBackend (Qwen TTS)
- PyTorchSTTBackend (Whisper)
- MLXTTSBackend (refactored from inline implementation)
- MLXSTTBackend (previously unprotected)
Closes#82
Upgrade CUDA toolkit from 12.6 (cu126) to 12.8 (cu128) for proper
RTX 50-series (Blackwell) GPU support. Users with RTX 5070/5080/5090
were reporting CUDA detection failures with cu126.
Also fix the GPU Acceleration settings panel where the 'Switch to CPU
Backend' button was unreachable — it was inside a conditional block
that required !isCurrentlyCuda, making it impossible to switch back
to CPU once running on CUDA.
Closes#315
Replace --collect-submodules + --collect-data with --collect-all for
qwen_tts. The qwen_tts runtime expects physical .py source files
(e.g. modeling_qwen3_tts.py) under _MEIPASS, which only --collect-all
provides. This is the same pattern used for inflect/typeguard.
Fixes#212
- Wrap download/verify/extract in try/finally so .download-*.tmp is
always deleted, even on mid-download or extraction failures
- Fix justfile build-server-cuda to use sh.voicebox.app (production path)
- Fix is_nvidia_file() to match NVIDIA DLLs in _internal/torch/lib/
(PyInstaller 6.18 + torch 2.10 no longer uses nvidia/ subdirectories)
- Remove deprecated split_binary.py (both archives are under 2GB)
- Update torch_compat range to >=2.6.0,<2.11.0
- Update build docs for new dual-archive packaging flow
Switch CUDA builds from PyInstaller --onefile to --onedir and split the
output into two separately versioned archives:
1. Server core (~200-400MB) — versioned with the app, redownloaded on
every app update
2. CUDA libs (~2GB) — versioned independently (cu126-v1), only
redownloaded when the CUDA toolkit or torch version changes
This eliminates the ~2.4GB full redownload on every version bump.
After initial setup, most app updates only need ~200-400MB.
Closes#297
Enrich tts-engines.mdx with patterns discovered during TADA integration:
- Phase 0.2: new greps for @torch.jit.script, torchaudio.load, gated repos
- Phase 3.4: model naming inconsistency warning
- Phase 5.2: TADA shim failure added to lessons table
- Phase 6: four new workaround sections (gated repos, torchcodec,
torch.jit.script, toxic dependency shim pattern)
- Checklist: four new items matching the new scan patterns
- Remove TADA from upcoming engines (now shipped)
Add CUDA_LIBS_ADDON.md exploring --onedir split to avoid 2.4GB
redownloads on every version bump.
Remove @torch.jit.script from the DAC shim's snake() function —
TorchScript calls inspect.getsource() which fails in PyInstaller
binaries (no .py source files).
Update all user-facing docs: 4 → 5 TTS engines, add TADA row to
every engine comparison table, mark TADA as Shipped in the upcoming
engines list, update architecture diagrams and tech stack tables.