Projects / Voice Studio
Voice Studio
Voice cloning, re-voicing and speaker separation, all on your own computer.
A free, fully local desktop app. Type text and hear it in any voice across 23 languages, re-voice a 20-minute recording while staying in sync with video, or split a podcast or film scene into one clean track per speaker plus the background. I built it solo in 12 days and shipped 15 releases.
- 12 days · 15 releases
- 16 MB installer for a 9 GB AI app
- Startup memory 3.9 GB → 0.12 GB
- 8/8 speaker counts right
How it's built
01 · Native window
A macOS window (pywebview and WKWebView) showing a dependency-free HTML/JS front end. On Linux and Windows it opens in the browser instead.
Why: No build step and no CDN means nothing to break offline, and the same UI runs on every platform.
02 · FastAPI features
Each feature (text to speech, speech to speech, separate speakers, mix, voices, links, setup) is its own router, assembled in one place.
Why: Features never import the server, so there are no import cycles and each module can be read on its own.
03 · Job service
One service runs every long task with the same states, progress, cancellation and conflict groups.
Why: Text to speech and speech to speech share the GPU, so jobs in the same group never run at once.
04 · Model manager
Models are plugins that load on demand, unload after 10 idle minutes, and are evicted least-recently-used over a RAM budget.
Why: Startup memory dropped from 3.9 GB to 0.12 GB, and memory after jobs from 14 GB to 6.4 GB, with job times unchanged.
05 · Speech models
Chatterbox TTS (23 languages), Whisper, Demucs, pyannote segmentation, CAM++ and Silero VAD.
Why: All are open source and commercially usable. Better-sounding non-commercial models were declined on purpose.
06 · Consent gate · human gate
The app asks for confirmation before any cloning, and every output carries an inaudible Perth watermark that can't be turned off.
Why: Responsible use is built in rather than left to the user.
07 · Installer
A 16 MB first-run app installs Python and the exact tested packages, then downloads models with pause, resume and SHA-256 checks.
Why: Freezing PyTorch into an app bundle is fragile. A locked first-run install is reproducible on every Mac.
The hardest problem: making re-voiced speech sound like the target speaker
Voice conversion changes how a voice sounds but keeps the original speaker’s rhythm and accent. Similarity metrics scored it at 0.90 and missed this completely. Listening caught it.
It took six designs to fix: pace steering, chunk-length steering, frame-level retiming, a text-to-speech route with a pace fit, and fixed pause levels (rejected as overfitting). The design that shipped measures each speaker’s own pause lengths and phrasing from their speech, and inserts them with no time-stretching at all. Likeness rose from 0.27–0.70 to 0.49–0.90.
What I learned
- Metrics can lie, so ears are the final test. Every big improvement started from a listening complaint, and then a metric was built to capture it.
- Verify your ground truth. Whisper word timestamps were wrong on noisy audio, and a whole version had been tuned against them.
- Measure the cause before building the fix. The “static” bug was clipping, and the GPU memory blow-up was an allocator setting.
- Packaging is half the product. Clean-machine tests caught bugs no development-machine test would.