
F5-TTS
Open source TTS with zero-shot voice cloning and multilingual support.
Replaces Elevenlabs, Playht, Resemble Ai, Cartesia

Who it's for
F5-TTS provides zero-shot voice cloning via a local API (Gradio) or CLI, removing per-character costs of managed TTS services. A reference audio clip is all you need to clone a voice and generate new speech at any volume your GPU can handle.
Your app serves fewer than a few hundred minutes of audio per month. At that volume, a managed API may be cheaper and simpler than provisioning a dedicated GPU server.
The codebase exposes the full training and inference pipeline, including the Sway Sampling implementation and E2 TTS baseline. The Sway Sampling strategy is designed to transfer to other flow-matching TTS models without retraining, making this a practical starting point for method development.
You need pre-trained multilingual models beyond what the base Emilia weights cover. The CC-BY-NC restriction on the weights may also block certain institutional research settings that require a fully open license.
Self-hosting F5-TTS replaces per-character or per-minute API billing with infrastructure costs. The TensorRT-LLM runtime achieves an RTF of 0.039 on a single L20 GPU at concurrency 2, making it viable for real-time or near-real-time generation.
You need a managed API with SLAs, support contracts, and no GPU operations overhead. Managed platforms handle all infrastructure so your team does not have to.
The 100,000-hour Emilia training gives the base model strong coverage of multiple languages and accents. Code-switching (mixing two languages mid-sentence) works out of the box, which benefits content targeting mixed-language markets.
Your target language is low-resource and unlikely to appear in the Emilia dataset. Cloning quality for rare languages or dialects may be below production standard.
The problem
Generating high-quality speech that matches a specific person's voice requires access to large language models that most teams cannot train from scratch. Commercial TTS platforms like ElevenLabs and PlayHT solve this with managed APIs, but they charge per character or per minute of generated audio. For any product generating more than a few minutes of speech per day, those charges add up, and every audio sample you send is processed by a third-party server. Beyond cost, the technical challenge of voice cloning has historically required complex pipelines with duration models, text encoders, and phoneme alignment to produce natural output. Teams building voice features either maintain that complexity themselves or accept vendor lock-in by using a managed service.
How it works
Clone any voice from a short audio reference without fine-tuning. The model pads input text to match the reference audio length and generates matching speech through a flow-matching denoising pass. No target-speaker training data or phoneme alignment required.
An inference-time flow step sampling strategy that improves performance and efficiency without retraining the model. Achieves an RTF of 0.15 on standard hardware and 0.039 with TensorRT-LLM on a single NVIDIA L20 GPU. Can be applied to other flow-matching TTS models.
Trained on 100,000 hours of the Emilia multilingual dataset. Generates speech in multiple languages and can code-switch (mix two languages) within a single output. This capability is available out of the box without custom configuration.
A browser-based interface for TTS, multi-style and multi-speaker generation, and voice chat powered by Qwen2.5-3B-Instruct. Launch with `f5-tts_infer-gradio` or through a Docker container on port 7860.
A Triton and TensorRT-LLM runtime for production deployment. Benchmarked on a single NVIDIA L20 GPU, it reaches an average latency of 253ms at concurrency 2 and an RTF of 0.039. Standard PyTorch on the same GPU runs at RTF 0.147.
Runs on NVIDIA (CUDA), AMD (ROCm), and Apple Silicon (MPS). RDNA 3.5 and RDNA 4 GPUs (Radeon 8050S/8060S, RX 9060/9070 series) require ROCm 7.x; ROCm 6.x lacks support for these architectures.
Features
- Zero-Shot Voice Cloning
- Sway Sampling for Efficient Inference
- Multilingual Support with Code-Switching
- Gradio Web Interface
- TensorRT-LLM Runtime for Production
- Multi-Platform GPU Support
How to install
Install F5-TTS as a pip package, or deploy via Docker for a Gradio web interface with GPU support.
pip install f5-tts
docker container run --rm -it --gpus=all -p 7860:7860 ghcr.io/swivid/f5-tts:mainRecommended for this setup
Strengths
- MIT License on the Code: The codebase is MIT licensed, which means you can fork it, modify it, and use it in commercial projects without restriction. The pre-trained weights carry CC-BY-NC due to the Emilia training dataset, so teams with commercial requirements should train their own weights on a licensed dataset.
- No Duration Model or Phoneme Alignment Required: Prior non-autoregressive TTS systems required separate duration models and phoneme alignment steps to work correctly. F5-TTS eliminates both: text is padded with filler tokens to match audio length, and ConvNeXt V2 handles text-to-audio alignment directly. This simplifies the pipeline without sacrificing quality.
- 15,000+ Stars, Actively Maintained: The repository has 15,442 GitHub stars and 2,249 forks. The last push was October 2026, and a v1 base model with improved training and inference performance was released in March 2025. Both point to an active project, not an abandoned research artifact.
- Speed Control at Inference Time: Speech speed can be adjusted during inference without retraining the model. This is available in both the Gradio interface and CLI, letting you tune output for use cases like audiobooks (slower) or real-time voice chat (faster) from the same model weights.
Trade-offs
- Pre-Trained Weights Are CC-BY-NC: The bundled model weights carry a CC-BY-NC license due to the Emilia training dataset. This restricts commercial use of those specific weights. If your product is commercial, you need to train your own weights on a dataset you hold the rights to, using the MIT-licensed training code in the repository.
- GPU Required for Practical Use: CPU inference works but is too slow for production use cases. A GPU is required to reach the published RTF numbers. NVIDIA is best-supported; AMD (ROCm) and Apple Silicon (MPS) are supported but require careful matching of PyTorch and driver versions, as noted in the README's hardware-specific install tables.
- Environment Setup Has Significant Friction: Installation requires a separate conda or virtual environment, then matching the PyTorch version to the hardware (CUDA/ROCm/XPU). AMD RDNA 3.5 and RDNA 4 GPUs specifically require ROCm 7.x and will error on ROCm 6.x. Docker is the cleanest path for most users who just need inference.
Tech stack
FAQ
The code is MIT licensed and free for any use, including commercial. The bundled pre-trained model weights carry a CC-BY-NC license due to the Emilia training dataset, which restricts commercial use of those specific weights. Teams with commercial requirements can train their own weights using the MIT-licensed training code on a dataset they hold the rights to.
A GPU is required for practical inference. NVIDIA (CUDA), AMD (ROCm), and Apple Silicon (MPS) are all supported. A single NVIDIA L20 GPU reaches an RTF of 0.039 with TensorRT-LLM and 0.147 with standard PyTorch. CPU inference works but is too slow for real-time or near-real-time use cases.
You provide a short reference audio clip and its transcription. F5-TTS pads the input text with filler tokens to match the reference audio length, then runs a flow-matching denoising pass through a Diffusion Transformer to generate speech in that voice. No fine-tuning or speaker-specific training data is needed.
Yes. The repository includes training and finetuning code using Hugging Face Accelerate, and a Gradio interface for quick-start finetuning. The README recommends creating a dedicated conda environment and matching the PyTorch version to your GPU type before starting.
The base model was trained on the Emilia multilingual dataset (100,000 hours of audio), which covers multiple languages. It supports code-switching (mixing two languages mid-sentence). Custom language support can be configured via the SHARED.md inference configuration. Quality for low-resource languages not well-represented in Emilia may be limited.