Voice cloning. Only clone a voice you have permission to use.
platform. The pre-trained models are licensed CC-BY-NC because of the Emilia training data, while the code is MIT.
Who it is forA developer adding narration to a script or a build pipeline.
The problemHosted TTS costs per character and sends your text to someone else.
The outcomeAn audio file speaking your text in the reference voice.
What you need first
- Python 3.10 or newer, for example a conda env created with `conda create -n f5-tts python=3.11`
- PyTorch and torchaudio matched to your device, plus FFmpeg
- A reference WAV clip of the voice you want, and its transcript if you do not want ASR to transcribe it
- A GPU for comfortable speed; the published benchmarks use a single L20
Steps
- Create an environment with
conda create -n f5-tts python=3.11andconda activate f5-tts, then install FFmpeg withconda install ffmpeg - Install PyTorch and torchaudio for your device as the README lists, then install the package with
pip install f5-tts - Run
f5-tts_infer-cli --model F5TTS_v1_Basewith--ref_audio,--ref_textand--gen_textset to your clip, its transcript and your text - Leave --ref_text "" to have an ASR model transcribe the clip instead, at the cost of extra GPU memory
Prompt for your agent
Using SWivid/F5-TTS, set up the environment, install `pip install f5-tts` and run f5-tts_infer-cli with my reference clip and transcript to read <my script>, saving the audio.
Caveat. Read the detailed inference guidance linked in the README before tuning quality.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for SWivid/F5-TTS and "Generate speech in a reference voice from the CLI"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer