How to turn text into speech with Coqui TTS
Install the current Coqui TTS fork and generate a WAV file with a pretrained model. Learn how model-specific language and speaker support, licenses, and voice cloning affect your setup.
Coqui TTS is an open-source toolkit for synthesizing speech from text with pretrained models, as well as for dataset utilities and model training. As of November 18, 2026, its current documentation covers the community-maintained coqui-tts 0.28.0 fork. The older TTS package and coqui-tts cannot be installed together, so start with a fresh virtual environment. Official FAQ
Before installing
These steps are for inference with pretrained models. Since Coqui TTS 0.27.4, PyTorch is no longer included by default. The documented test range is Python 3.10 to below 3.15 and PyTorch 2.2 or newer; PyTorch 2.9 and newer also requires torchcodec. If you plan to use a GPU, first choose the PyTorch command that matches your operating system and CUDA/ROCm setup. Installation guide
With uv and a virtual environment ready, install the PyTorch packages and then Coqui:
uv pip install torch torchaudio torchcodec --torch-backend=auto
uv pip install coqui-ttsIf using PyTorch below 2.9, omit torchcodec from the first command. For an environment where you manage CUDA yourself, use the matching command from the official PyTorch installer. The docs describe cloning the repository and using an editable install for development or training.
Generate a WAV with a pretrained model
Coqui supports inference through a Python API, the tts command-line tool, or a local demo server. This example loads XTTS-v2 in Python and writes an English sentence to a file. Model names, language codes, and speaker names vary, so check the model list and its documentation first. XTTS-v2 lists 17 supported languages, including Korean; that does not mean every model in the toolkit supports the same languages. Synthesis guide · XTTS docs
import torch
from TTS.api import TTS
device = "cuda" if torch.cuda.is_available() else "cpu"
model = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
model.tts_to_file(
text="Hello world!",
speaker="Craig Gutsy",
language="en",
file_path="output.wav",
)On first use, the model files may be downloaded, so allow for network access and disk space. Confirm that output.wav exists, then listen for pronunciation, the selected language, truncation, or silence. To see whether a model provides a speaker list, use print(model.speakers). An unsupported language or speaker can cause an error or unexpected speech.
Voice cloning and licenses
Some models accept a reference recording through speaker_wav; others offer only preset speakers. XTTS-v2 supports cloning but is documented for 17 languages. Use recordings only when you have permission and consent, and do not use a cloned voice to impersonate someone or deceive listeners. Voice cloning guide
The toolkit and each pretrained model do not necessarily share a license. XTTS-v2's model license explicitly allows only non-commercial use of the model and its outputs. Before using a model in a product or revenue-generating activity, read that model's full license and verify your rights to the data and voice. XTTS-v2 license
When something goes wrong
If `TTS` conflicts with the current package, use a fresh environment with only `coqui-tts`.
For `torch` or audio errors, check versions and CPU/GPU compatibility for PyTorch, `torchaudio`, and, when needed, `torchcodec`.
If generation fails, compare the model name and supported language or speaker with the model list and documentation. The model download path appears in `tts --list_models`. [Official FAQ](https://coqui-tts.readthedocs.io/en/latest/faq.html)
Do not infer model capability or usage rights from the toolkit name alone. Choose the actual model for your project, confirm its language and speaker support and permitted use, then listen to the generated audio.