# F5-TTS — card for AI agents

Zero-shot voice-cloning TTS; code MIT, pre-trained weights CC BY-NC.

Category: Voiceover (text-to-speech) · maker SWivid (SJTU et al.) · checked 2026-11-10

## Price
- Price: Free
- Free tier: Self-hosted.

## License
Code MIT; weights CC-BY-NC-4.0 — https://github.com/SWivid/F5-TTS

- commercial: **conditions** (Commercial use with conditions)
  > Our code is released under MIT License. The pre-trained models are licensed under the CC-BY-NC license due to the training data Emilia
  (https://github.com/SWivid/F5-TTS)
- attribution: **required** (Credit required)
  > license: cc-by-nc-4.0
  (https://huggingface.co/SWivid/F5-TTS)
- in app: **conditions** (Ship inside your app with conditions)
  > The pre-trained models are licensed under the CC-BY-NC license due to the training data Emilia, which is an in-the-wild dataset.
  (https://github.com/SWivid/F5-TTS)
- youtube: **no** (Not for monetized YouTube)
  > The pre-trained models are licensed under the CC-BY-NC license due to the training data Emilia, which is an in-the-wild dataset.
  (https://github.com/SWivid/F5-TTS)

## Rules to follow
- Do not use the official pre-trained weights commercially.

## Can an AI agent use it by itself?
**Yes** · package: Agent installs a package or loads it from a CDN

## How an agent gets files
- pip install f5-tts; run f5-tts_infer-cli --model F5TTS_v1_Base --ref_audio <wav> --ref_text <text> --gen_text <text>. Weights on Hugging Face (SWivid/F5-TTS). (sign-in: none)
- Not allowed: Pre-trained models are CC-BY-NC: non-commercial use only.
- Not allowed: Code is MIT.

## How to connect
- Package (npm/PyPI)
- PyPI: `pip install f5-tts`
- Repository: https://github.com/SWivid/F5-TTS
- Website: https://github.com/SWivid/F5-TTS

## Numbers (AgentGid data)
- Gid Score: 47
- GitHub stars: 15,622
- Downloads last week: 31,245

## Lines to paste into your prompt or AGENTS.md

```
- F5-TTS (Voiceover (text-to-speech)). Zero-shot voice-cloning TTS; code MIT, pre-trained weights CC BY-NC. Price: free; commercial use with conditions; credit required; ship inside your app with conditions.
  Connect: PyPI f5-tts.
  Get files: pip install f5-tts; run f5-tts_infer-cli --model F5TTS_v1_Base --ref_audio <wav> --ref_text <text> --gen_text <text>. Weights on Hugging Face (SWivid/F5-TTS).
  Not allowed: Pre-trained models are CC-BY-NC: non-commercial use only.
  Not allowed: Code is MIT.
  Rule: Do not use the official pre-trained weights commercially.
  License: https://github.com/SWivid/F5-TTS (checked 2026-11-10; details: https://agentgid.com/assets/f5-tts/)
```

## Links
- AgentGid page: https://agentgid.com/assets/f5-tts/
- Is it free for commercial use? https://agentgid.com/assets/f5-tts/commercial-use/
- Source: https://github.com/SWivid/F5-TTS
- Source: https://huggingface.co/SWivid/F5-TTS


## F5-TTS: speech in any voice from a short sample

F5-TTS is a free voice model you run on your own computer. You give it a short recording of a voice and its words, and it reads any new text in that voice, in English and Chinese with the official model. The code may be used in paid work, but the official trained model is for non-commercial use only.

### Where to use it
- Narration in a chosen voice: Read a script in the voice of a short sample you have the right to use, such as your own voice, for a lesson or a personal video.
- A story with several voices: Voice a short story or dialogue where each character has its own sample, switching voices with tags in the text.
- Speech from your Python code: Call the model from a Python script or backend to produce voice files for each new text, such as personal audio notes.
- A simple voice web page: Start a local web page where you upload a sample, type text and listen, without writing code.
- Voices in more languages: Use or train a model for another language; the project lists community models for French, German, Hindi, Russian and more, each with its own license.
- Spoken replies in a hobby assistant: Stream the voice in short pieces so a personal, non-commercial assistant can answer out loud.

### How to start
- Make a Python 3.10+ environment, install FFmpeg and a PyTorch build for your device (NVIDIA, AMD, Intel or Apple Silicon), then install the package.

```
pip install f5-tts
```

- Try it in the browser first.

```
f5-tts_infer-gradio
```

- Or run one line from the command line with a sample clip and its transcript.

```
f5-tts_infer-cli --model F5TTS_v1_Base \
--ref_audio "provide_prompt_wav_path_here.wav" \
--ref_text "The content, subtitle or transcription of reference audio." \
--gen_text "Some text you want TTS model generate for you."
```


### License
The code is MIT, so it is free for any use. The official trained models are CC BY-NC, so speech made with them is for non-commercial use only.

### Good to know
- One generation is at most 30 seconds, sample included. The ready tools split longer text by themselves.
- Samples longer than about 12 seconds are cut short. Use a clean clip under 12 seconds with a second of silence at the end.
- FFmpeg must be installed. If the result is pure silence, a missing FFmpeg is the first thing to check.
- Community models for other languages have their own licenses; most are non-commercial too, one Apache-2.0 model is listed.
- The model files download from Hugging Face on first use, so the first run needs internet.

Checked 2026-11-10 against: https://github.com/SWivid/F5-TTS, https://github.com/SWivid/F5-TTS/blob/main/README.md, https://github.com/SWivid/F5-TTS/blob/main/src/f5_tts/infer/README.md, https://github.com/SWivid/F5-TTS/blob/main/src/f5_tts/infer/SHARED.md, https://github.com/SWivid/F5-TTS/blob/main/LICENSE, https://github.com/SWivid/F5-TTS/blob/main/pyproject.toml, https://huggingface.co/SWivid/F5-TTS, https://arxiv.org/abs/2410.06885, https://swivid.github.io/F5-TTS/, https://pypi.org/pypi/f5-tts/json

### Mistakes to avoid
- Don't: Using the official F5TTS_v1_Base output in a paid app, an ad or a monetised channel → Do: Keep official-model output non-commercial, or use a checkpoint whose own license allows commercial use (Only the code is MIT; the official models are CC BY-NC.)
- Don't: Passing a 30-second reference clip → Do: Trim it to under 12 seconds and leave about 1 second of silence at the end (Long references are clipped to about 12 seconds and may cut a word in the middle.)
- Don't: --ref_text "" on a small graphics card → Do: Pass the exact transcript of the reference clip (An empty ref_text loads a speech recognition model and uses extra graphics memory.)
- Don't: Writing "Hello.World." without a space after the period → Do: Put a space after each sentence-ending English punctuation mark (Without the space the text is not split into chunks there.)
- Don't: f5-tts_infer-gradio --share on a machine with private samples → Do: Run it locally without --share, or behind your own login (The share flag creates a public link to the app and the voices you upload.)

### Questions
- Can I use F5-TTS voices in a paid product or a monetised video? Not with the official models. The code is MIT, but those models are CC BY-NC, which rules out commercial use.
- How long should my voice sample be? Under 12 seconds, with about one second of silence at the end; longer clips are cut.
- Do I have to type what the sample says? It is better to. If you leave it empty, a speech recognition model writes it for you and uses extra graphics memory.
- Is there a version without the command line? Yes. f5-tts_infer-gradio starts a local web page for the same tasks.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
