# AI use cases for F5 TTS (SWivid/F5-TTS)

Repo: [SWivid/F5-TTS](https://github.com/SWivid/F5-TTS) | Use cases: 3 | Page: https://dedupedai.com/use-cases/swivid-f5-tts/

F5-TTS is a flow matching text to speech system with a Diffusion Transformer backbone, released with E2 TTS and Sway Sampling. It generates speech in the voice of a short reference clip, and ships a Gradio app with chunk inference, multi style and multi speaker generation and a voice chat mode, a command line inference tool, a finetuning app and a Triton plus TensorRT-LLM runtime.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Generate speech in a reference voice from the CLI: https://dedupedai.com/use-cases/swivid-f5-tts/generate-speech-from-the-command-line-with-f5-tts/
- Run a local web app for multi style and multi speaker audio: https://dedupedai.com/use-cases/swivid-f5-tts/run-the-f5-tts-gradio-app-for-multi-speaker-audio/
- Run F5 TTS in a container instead of installing it: https://dedupedai.com/use-cases/swivid-f5-tts/run-f5-tts-in-docker-for-a-repeatable-setup/

## How to generate speech in a reference voice from the CLI with F5 TTS

Repo: [SWivid/F5-TTS](https://github.com/SWivid/F5-TTS) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Install the package and run one command with your reference audio and the text you want spoken.

**Who it is for:** A developer adding narration to a script or a build pipeline.

**The problem:** Hosted TTS costs per character and sends your text to someone else.

**The outcome:** An audio file speaking your text in the reference voice.

### Steps

1. Create an environment with `conda create -n f5-tts python=3.11` and `conda activate f5-tts`, then install FFmpeg with `conda install ffmpeg`
2. Install PyTorch and torchaudio for your device as the README lists, then install the package with `pip install f5-tts`
3. Run `f5-tts_infer-cli --model F5TTS_v1_Base` with `--ref_audio`, `--ref_text` and `--gen_text` set to your clip, its transcript and your text
4. Leave --ref_text "" to have an ASR model transcribe the clip instead, at the cost of extra GPU memory

### Prompt to paste into your agent

```text
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.

Risk, voice cloning: Only clone a voice you have permission to use.

Risk, platform: The pre-trained models are licensed CC-BY-NC because of the Emilia training data, while the code is MIT.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/swivid-f5-tts/generate-speech-from-the-command-line-with-f5-tts/

## How to run a local web app for multi style and multi speaker audio with F5 TTS

Repo: [SWivid/F5-TTS](https://github.com/SWivid/F5-TTS) | Difficulty: Beginner | Time: 30 minutes | Basis: From the README

Launch the Gradio interface to generate chunked, multi speaker or voice chat audio in a browser.

**Who it is for:** A creator who wants a UI rather than flags.

**The problem:** Command line flags are awkward for iterating on takes.

**The outcome:** A local web app where you can produce and compare takes.

### Steps

1. Install the package with `pip install f5-tts` as in the installation section
2. Launch the app with `f5-tts_infer-gradio`
3. Choose the port and host with `f5-tts_infer-gradio --port 7860 --host 0.0.0.0`, or create a public link with `f5-tts_infer-gradio --share`
4. Use the Multi-Style and Multi-Speaker Generation and Voice Chat features listed in the README

### Prompt to paste into your agent

```text
With SWivid/F5-TTS, start the Gradio app on port 7860 and walk me through producing a two speaker dialogue from <my script>.
```

### Caveat

Voice Chat in the app is powered by Qwen2.5-3B-Instruct, which is an extra model to download.

Risk, voice cloning: The app clones the voice in whatever reference clip you upload, so use voices you may use.

Risk, platform: The --share flag exposes your app through a public link.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/swivid-f5-tts/run-the-f5-tts-gradio-app-for-multi-speaker-audio/

## How to run F5 TTS in a container instead of installing it with F5 TTS

Repo: [SWivid/F5-TTS](https://github.com/SWivid/F5-TTS) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Use the published image or build the Dockerfile so the CUDA and PyTorch setup is fixed.

**Who it is for:** A team that wants the same TTS setup on every machine.

**The problem:** Matching CUDA, PyTorch and FFmpeg versions by hand breaks often.

**The outcome:** A container that runs the CLI or the web interface the same way everywhere.

### Steps

1. Build the image with `docker build -t f5tts:v1 .` from the repo, or pull the published one
2. Run the container from the registry with the README command for `ghcr.io/swivid/f5-tts:main`, mounting the f5-tts volume onto the Hugging Face hub cache and publishing port 7860
3. To go straight to the web interface append `f5-tts_infer-gradio --host 0.0.0.0` to that run command
4. For an NVIDIA machine copy the docker compose example in the README

### Prompt to paste into your agent

```text
Using SWivid/F5-TTS, get the docker image running with the hub cache volume and port 7860, then generate one sample to prove the setup works.
```

### Caveat

Model weights download into the mounted cache volume on first run.

Risk, platform: The documented run commands pass --gpus=all, so they expect an NVIDIA container runtime.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/swivid-f5-tts/run-f5-tts-in-docker-for-a-repeatable-setup/
