Installing F5-TTS with CUDA Acceleration on Jetson Orin (JetPack 7.2)
Context
JetPack 7.2 ships with CUDA 13.2 and Python 3.12. Official PyTorch wheels for Jetson are compiled for Python 3.10, and building from source with CUDA 13.2 fails due to cuFFT and CUB incompatibilities.
The solution is to use the upstream PyTorch wheel for CUDA 13.2 (compatible with aarch64) and compile torchaudio from source.
Step 1: Prepare the System
sudo apt update
sudo apt install -y python3-pip python3-venv python3-dev git wget curl \
libsndfile1 libsndfile1-dev ffmpeg build-essential libopenblas-dev libomp-dev
Step 2: Create Virtual Environment (Python 3.12)
cd ~
mkdir f5-tts && cd f5-tts
python3 -m venv f5-env
source f5-env/bin/activate
pip install --upgrade pip setuptools wheel
pip install "numpy<=1.26.4"
Step 3: Install PyTorch with CUDA 13.2 (upstream wheel)
pip install torch==2.12.0+cu132 --index-url https://download.pytorch.org/whl/cu132
Verify:
python3 -c "import torch; print(torch.__version__, torch.cuda.is_available(), torch.version.cuda)"
Expected output: 2.12.0+cu132 True 13.2
Note: A warning about
compute capability 8.7will appear. It is harmless (PyTorch uses sm_80 fallback).
Step 4: Build torchaudio from Source
cd ~
git clone --recursive https://github.com/pytorch/audio.git
cd audio
git checkout v2.12.0
git submodule update --init --recursive
export BUILD_SOX=0
export MAX_JOBS=2
python3 setup.py install
Verify:
python3 -c "import torch, torchaudio; print(torch.__version__, torchaudio.__version__, torch.cuda.is_available())"
Expected output: 2.12.0+cu132 2.11.0a0+... True
Step 5: Install F5-TTS Dependencies
pip install accelerate cached_path click datasets ema_pytorch gradio hydra-core \
librosa matplotlib pydub pypinyin rjieba safetensors soundfile tomli tqdm \
transformers transformers_stream_generator unidecode wandb x_transformers \
torchdiffeq vocos torchcodec
Step 6: Clone and Install F5-TTS
cd ~
git clone https://github.com/SWivid/F5-TTS.git
cd F5-TTS
pip install -e .
Verify the CLI:
f5-tts_infer-cli --help
Step 7: Download the Base Model (F5TTS_v1_Base)
python3 -c "from f5_tts.api import F5TTS; tts = F5TTS(device='cuda')"
The model (~1.5 GB) will be downloaded automatically from Hugging Face.
Step 8: Test Basic Voice Cloning (with synthetic reference)
Create a script test_f5.py:
import torch
from f5_tts.api import F5TTS
import torchaudio
device = "cuda" if torch.cuda.is_available() else "cpu"
tts = F5TTS(device=device)
# Synthetic reference audio (pure tone)
ref_audio = torch.sin(2 * 3.14159 * 440 * torch.linspace(0, 2, 48000)) * 0.3
torchaudio.save("ref.wav", ref_audio.unsqueeze(0), 24000)
tts.infer(
ref_file="ref.wav",
ref_text="Reference audio for testing.",
gen_text="This is a test of F5 TTS on Jetson Orin with CUDA acceleration.",
file_wave="output.wav"
)
print("Audio generated: output.wav")
Run:
python3 test_f5.py
Step 9: Playback the Generated Audio
Once output.wav is generated, you can play it using any audio player. For example:
mpv output.wav
(If you have a USB audio device, you may need to specify the device with --audio-device. Use aplay -L to list available devices.)
Component Summary
| Component | Version |
|---|---|
| PyTorch | 2.12.0+cu132 |
| torchaudio | built from v2.12.0 |
| F5-TTS | latest (git) |
| Model | F5TTS_v1_Base |
Notes
- The CC 8.7 warning is harmless and can be ignored.
- If you see “unauthenticated requests to HF Hub”, export your token:
export HF_TOKEN=... - Audio generation takes ~15 seconds for a short phrase on the Orin Nano Super.
- This guide is not official