myVoice: Cloning My Own Voice Locally, Including Telugu
Hosted voice cloning services charge per character, require uploading recordings of your voice to someone else's servers, and tend to handle Indian languages poorly. I wanted something different: clone my own voice, generate speech from any text, and keep everything on my own machine. That is what myVoice does.
Why I built it
I wanted an "Instant Voice Clone" workflow similar to ElevenLabs, but with three constraints: no account, no upload of my recordings, and no per-character cost. The open-source Chatterbox model made that realistic on a Mac using the Apple GPU (MPS).
I also wanted it to work for Telugu and other Indian languages, since I am based in Hyderabad. That requirement shaped much of the architecture, because no single model covered everything I needed.
What it does
- Create a voice. You read an on-screen script into the mic, or upload old recordings, add each sample, fill in a name and labels, tick a consent box, save, and preview.
- Speak or make a podcast. Paste text of any length, pick a voice, generate, and download WAV or MP3. For multi-voice podcasts, you start lines with a saved voice name, for example
Ramesh: Welcome to the show!followed byPriya: Thanks for having me. - Command line. A
sayscript lists voices, creates them from sample files, and renders text or a text file tooutputs/as WAV and MP3. - Indian languages. Telugu, Hindi, Tamil, Kannada, Malayalam, Marathi, Bengali, Gujarati, Punjabi, Odia and Assamese are supported. Other languages such as Spanish, French and Japanese go through Chatterbox.
- Translate, review, listen. In an Indian language you can type English, translate it, edit the result in a text box, then generate audio.
The web page also includes a clear audio player, a four-step setup guide and an FAQ with structured data for search.
How it works
Two engines, two environments
Chatterbox handles English and the non-Indic languages. For Indian languages I use IndicF5 from AI4Bharat, which runs in a separate virtual environment (.venv-indic) driven by a worker script. Keeping it separate avoids forcing two sets of model dependencies to agree on one Python environment. The core logic lives in engine.py, the local studio UI in studio.py, the hosted API in server.py, the CLI in say.py, and the IndicF5 runner in indic_worker.py.
Translation stays local too
The translate step uses AI4Bharat IndicTrans2 if you have accepted its terms on Hugging Face, and otherwise falls back to Meta's NLLB-200, which needs no sign-up but carries a non-commercial license. Speaker tags and paragraph breaks are preserved, and text already in Telugu or Hindi script is not translated again. The editable review box matters: machine translation is rarely perfect, and a person should be able to fix it before the audio is generated.
Getting a natural accent
For Indian languages, the voice-creation page asks you to record one sentence per language, under 14 seconds, with a transcript that matches exactly what you said. Without it, your main recording is used and auto-transcribed. That works, but the README is honest about the result: it sounds like English-accented Telugu or Hindi.
Putting it online
The public site is a Next.js app in app/ deployed on Vercel. Vercel cannot run the voice models, which need gigabytes of weights and minutes per job, so the site calls an engine elsewhere. I built two options:
- Engine on my Mac.
run_online.shstarts the engine and a Cloudflare quick tunnel, then prints the URL to set asSPACE_URLin Vercel. Only the key-protected API goes through the tunnel; the studio UI answers locally only. The catch is that the tunnel URL changes on every restart and the site works only while the Mac is on. - Engine on a Hugging Face Space. A deploy script creates a Docker Space and a private dataset for voices, sets secrets, and uploads the code. Free CPU works but is slow, so a GPU with a sleep timeout is the better option. This route needs HF PRO.
In both cases the browser talks to Vercel, Vercel talks to the engine with an API key, and the audio comes back as a signed, expiring MP3 link served by the engine. One thing to know: the site has no login, so anyone with its URL can generate audio in the saved voices.
What I learned
- Split heavy ML from the web tier. A serverless host is a good fit for a public page but not for model inference. A thin frontend plus an API-key-protected engine keeps each part doing what it is suited for.
- Separate virtual environments are cheap insurance. Running IndicF5 in its own venv kept its requirements from conflicting with Chatterbox.
- Input quality beats input quantity. A clean 30 to 60 seconds of audio beats a noisy five minutes. Record in a quiet room with no echo, with the mic about 15 cm away, and speak in the style you want back.
- Tune the sliders. Expressiveness at 0.5 is neutral and 0.7 to 0.9 is lively. If speech gets fast, lowering Pace to around 0.3 helps. These sliders apply to Chatterbox languages only.
- Keep a human in the loop for translation. Showing the translation in an editable box before synthesis catches errors early and is simple to build.
- Consent and provenance matter. Voice creation requires a consent tick, and generated audio carries Chatterbox's built-in inaudible watermark (Perth). Only clone voices you own or have permission to use.
Try it
The public page is at myvoice-ir.vercel.app. It shows the player, the setup guide and the FAQ. Recording and managing voices happens in the studio, which runs on the machine hosting the engine.
Conclusion
myVoice started as a way to avoid per-character fees and uploading my voice, and it turned into a small lesson in splitting a project across environments: one for the web, one for each model family. If you want to build something similar, start with clean recordings, keep the heavy models away from your serverless host, and let a human review any machine translation before it is spoken.