$ show jamiepine/voicebox
Voicebox is a local-first, open-source desktop application for AI voice cloning, text-to-speech (TTS), speech-to-text (STT), and dictation. It provides a full voice I/O stack that runs entirely on the user's machine, supporting multiple TTS engines (Qwen3-TTS, Chatterbox, Kokoro, TADA, LuxTTS, etc.) with zero-shot voice cloning from short audio samples. The application is built as a Tauri v2 desktop shell (Rust) wrapping a React/TypeScript frontend and a Python FastAPI backend with SQLite storage. Key features include global dictation with auto-paste, voice profile management with effects chains, a multi-track story editor, MCP server integration for AI agents, and GPU acceleration (CUDA, ROCm, MLX, DirectML). The architecture follows a service-oriented pattern with a backend factory for pluggable TTS/STT engines, SSE-based progress streaming, and a platform abstraction layer for cross-platform compatibility. The codebase is well-structured with extensive documentation, CI/CD pipelines, and a large community.
The LLM identified 5 files worth highlighting for reuse:
Defines the TTSBackend and STTBackend protocols, ModelConfig dataclass, and a factory function to instantiate backends by engine name. This pattern allows adding new TTS/STT engines by simply creating a new module and registering it in the config list, without modifying core orchestration code. It is a clean, reusable plugin architecture that could be extracted for any multi-engine inference system.
Implements sentence-boundary splitting, crossfade concatenation, and retry logic for TTS generation to handle unlimited-length output and detect hallucinated post-silence noise (runaway). The algorithm is self-contained, parameterized, and could be reused in any TTS pipeline that needs to generate long audio from a model with limited context or stability issues.
Provides a thread-safe ProgressManager that emits SSE events for long-running tasks (model downloads, generation). It supports throttling, cancellation, and merging of active progress items. This is a reusable pattern for any application that needs real-time progress updates from background tasks, independent of the specific task type.
Defines a React context and hook (usePlatform) that abstracts platform-specific capabilities (filesystem, audio, lifecycle, updater) behind a unified interface. Separate implementations exist for Tauri and web, allowing the same frontend code to run in both environments. This pattern is highly reusable for any application that needs to support multiple desktop and web targets with minimal code duplication.
Implements cross-platform clipboard snapshot and restore for the dictation auto-paste feature. Uses macOS autorelease pools and Windows format enumeration to handle clipboard state correctly. This is a non-trivial OS integration that solves a common problem in automation tools and could be extracted as a reusable clipboard utility for Tauri applications.