{"id":23088,"library":"f5-tts","title":"F5-TTS: Flow Matching Text-to-Speech","description":"F5-TTS is a text-to-speech library using flow matching, designed for faithful and fluent speech synthesis. Current version: 1.1.20. Active development with frequent releases.","status":"active","version":"1.1.20","language":"python","source_language":"en","source_url":"https://github.com/SWivid/F5-TTS","tags":["text-to-speech","flow-matching","audio","deep-learning","pytorch"],"install":[{"cmd":"pip install f5-tts","lang":"bash","label":"PyPI install"},{"cmd":"pip install f5-tts[infer]","lang":"bash","label":"Install with inference dependencies"}],"dependencies":[{"reason":"Core requirement for model execution","package":"torch","optional":false},{"reason":"Inference UI, version <6.11 recommended","package":"gradio","optional":true},{"reason":"Vocoder for waveform generation","package":"vocos","optional":true}],"imports":[{"note":"Old import path used in v1.0; main API moved to top-level f5_tts","wrong":"from f5_tts.model import F5TTS","symbol":"F5TTS","correct":"from f5_tts import F5TTS"},{"note":"infer_batch is not exposed at package level; must import from .infer module","wrong":"from f5_tts import infer_batch","symbol":"infer_batch","correct":"from f5_tts.infer import infer_batch"}],"quickstart":{"code":"from f5_tts import F5TTS\n\ntts = F5TTS()\n\n# Generate speech from text\nwaveform, sample_rate = tts.infer(text=\"Hello, world!\", ref_audio=\"path/to/ref.wav\", ref_text=\"Reference text\")\n\n# Save to file\nimport soundfile as sf\nsf.write(\"output.wav\", waveform, sample_rate)","lang":"python","description":"Quick start for basic inference with a reference audio clip."},"warnings":[{"fix":"pip install 'gradio<6.11'","message":"Gradio version conflict: Gradio >=6.11 causes UI freeze. Pin to <6.11 or use version from requirements.","severity":"gotcha","affected_versions":">=1.1.20"},{"fix":"from f5_tts import F5TTS","message":"Direct import of model classes (e.g., `from f5_tts.model import F5TTS`) may break in future releases. Use top-level `from f5_tts import F5TTS`.","severity":"deprecated","affected_versions":">=1.1.0"},{"fix":"Always provide matching reference text for best results.","message":"Inference requires both reference audio and reference text. Omitting ref_text may yield poor quality.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install f5-tts","cause":"Library not installed or virtual environment not activated.","error":"ModuleNotFoundError: No module named 'f5_tts'"},{"fix":"pip install --upgrade f5-tts, then use from f5_tts import F5TTS","cause":"Outdated version (<1.1.0) where F5TTS was in a submodule.","error":"ImportError: cannot import name 'F5TTS' from 'f5_tts'"},{"fix":"Upgrade to f5-tts>=1.1.19","cause":"Known bug in v1.1.18 fixed in v1.1.19.","error":"RuntimeError: MelSpectrogram cache issue"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}