Skip to content

Guide · Open source

How to use F5-TTS: install, run the web app and CLI

Updated · written with AI from the project's own documentation and checked against our catalogue data

F5-TTS is an open-source model that turns written text into speech. You give it a short recording of a voice and the text that recording says, and it generates new speech in that voice saying whatever text you provide. This guide walks through installing it, launching the web interface, and running the command-line tool, so you can produce your first clip.

F5-TTSSWivid/F5-TTS · ★ 15.5k · MIT

Quick start

  1. 1Create an environment. Create and activate a conda environment with Python 3.11, then install FFmpeg into it.
  2. 2Install PyTorch. Install a PyTorch build that matches your GPU, such as CUDA for NVIDIA or ROCm for AMD on Linux.
  3. 3Install F5-TTS. Run pip install f5-tts for inference use.
  4. 4Launch the web app. Run f5-tts_infer-gradio and open the address it prints in your browser.
  5. 5Prepare a reference clip. Choose a short recording of a voice you have permission to use and write down the words it says.
  6. 6Generate speech. Run f5-tts_infer-cli with --ref_audio, --ref_text and --gen_text, or load a .toml config file.

What you need before installing F5-TTS

F5-TTS is aimed at people comfortable running Python. The README lists Python 3.10 or newer (its example uses 3.11), conda or virtualenv, FFmpeg, and PyTorch built to match your GPU.

The README's benchmarks were all run on a GPU, so plan on a GPU-backed setup. The README does not give minimum hardware specs.

  • Python 3.10 or newer
  • conda or virtualenv for an isolated environment
  • FFmpeg
  • PyTorch with a build matched to your GPU (NVIDIA, AMD, Intel or Apple Silicon each have a different install command in the README)

Create an environment and install FFmpeg

Start by creating a separate environment so F5-TTS dependencies stay isolated. Then install FFmpeg into that environment.

conda create -n f5-tts python=3.11 conda activate f5-tts conda install ffmpeg

Install PyTorch for your GPU

Install PyTorch before F5-TTS, using the command that matches your hardware. The README gives separate examples for NVIDIA (CUDA), AMD (ROCm, Linux only), Intel GPUs (XPU, or IPEX) and Apple Silicon. Pick the CUDA or ROCm version that matches your system; the README's examples are only illustrations.

  • NVIDIA: install torch and torchaudio built for your CUDA version
  • AMD: install a ROCm build on Linux. RDNA 3.5 and RDNA 4 GPUs need ROCm 7.x according to the README
  • Intel: use the XPU build or Intel Extension for PyTorch (IPEX)
  • Apple Silicon: install the standard torch and torchaudio packages
pip install torch==2.8.0+cu128 torchaudio==2.8.0+cu128 --extra-index-url https://download.pytorch.org/whl/cu128

Install F5-TTS for inference

If you only want to generate speech, install the pip package. If you also plan to train or fine-tune models, the README describes a local editable install from a git clone instead.

  • Pip package (inference only): run the command below
  • Local editable install (for training and finetuning): clone the repository, change into the folder, then run pip install -e .
pip install f5-tts

Launch the Gradio web interface

The easiest way to try F5-TTS is the Gradio web app. The README lists basic TTS with chunk inference, multi-style and multi-speaker generation, and a voice chat feature powered by Qwen2.5-3B-Instruct. You can set the host and port, or create a share link.

  • Default launch: open the local address the app prints
  • Set host and port with --host and --port (the README uses 7860)
  • Use --share to create a share link
f5-tts_infer-gradio f5-tts_infer-gradio --port 7860 --host 0.0.0.0 f5-tts_infer-gradio --share

Generate speech from the command line

The CLI takes a reference audio file, the text spoken in that audio, and the text you want generated. If you leave --ref_text empty, the README says an ASR model will transcribe the reference audio, which uses extra GPU memory. You can also run with the default TOML config or your own .toml file, and the README shows a multi-voice example.

Replace the placeholder file name and text with your own. Use a reference recording of a voice you have permission to use.

  • --model selects the model; the README example uses F5TTS_v1_Base
  • --ref_audio is the path to your reference recording
  • --ref_text is what the reference recording says
  • --gen_text is the text to synthesize
  • -c loads a settings file such as custom.toml
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." f5-tts_infer-cli f5-tts_infer-cli -c custom.toml

Run it with Docker instead

The README also provides a Docker image on GitHub Container Registry. The quickstart below runs the web interface with GPU access, and maps port 7860 to your machine. It requires a Docker setup with GPU support.

  • The image mounts a volume for the Hugging Face cache, so downloaded models persist between runs
docker container run --rm -it --gpus=all --mount 'type=volume,source=f5-tts,target=/root/.cache/huggingface/hub/' -p 7860:7860 ghcr.io/swivid/f5-tts:main f5-tts_infer-gradio --host 0.0.0.0

What people use it for

  • Generating narration in a voice you have permission to use
  • Experimenting with open voice-cloning TTS as a researcher or developer
  • Self-hosting TTS instead of sending text to a paid cloud service
  • Testing multi-voice or multi-style generation with the TOML examples in the repository

Frequently asked questions

Is F5-TTS free to use?

F5-TTS is released under the MIT licence, according to the repository. The README does not discuss pricing for any hosted service. Check the licence file in the repository for the full terms.

What do I need to run F5-TTS?

The README lists Python 3.10 or newer, conda or virtualenv, FFmpeg, and PyTorch built for your GPU. Its benchmarks were all run on a GPU, and it does not state minimum hardware requirements.

How do I install F5-TTS?

Create a conda environment with Python 3.11, install FFmpeg, install a GPU-matched PyTorch, then run pip install f5-tts for inference. Developers who want to train models should clone the repository and run pip install -e . instead.

Can I run F5-TTS without a GPU?

The README does not describe CPU use. Its benchmark results are all on GPUs, so a GPU is the setup the project documents. Expect slow results without one.

What are the alternatives to F5-TTS?

The comparable projects listed for this directory are Coqui TTS, Piper, Bark and XTTS. Each has different trade-offs in setup, voice quality and licensing, so compare them against your own needs.

Can I clone a voice that is not mine?

The README does not discuss consent or misuse policies. Only use a reference recording of a voice you have permission to use, and check the licence and any local rules that apply to your project.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

F5-TTS suits researchers and developers who are comfortable with Python and a GPU, and who want self-hosted voice-cloning TTS under an MIT licence. If you want a finished voice app with no setup, or you do not have a GPU, pick a hosted tool or a lighter option such as Piper.

Install options & downloads

Find exactly what
you're looking for