Run NVIDIA's FastPitch and HiFiGAN text-to-speech models on Google Cloud TPUs using PyTorch/XLA, achieving real-time factors (RTF) of up to 160x.
| TPU Version | End-to-End Latency | RTF (approx.) |
|---|---|---|
| v3 | 230ms | 125x |
| v5e | 50-60ms | 140x |
| v5p | 40-50ms | 160x |
*Benchmarks performed on ~7-8 second audio generations including padding
This repository demonstrates how to run NVIDIA's FastPitch (text-to-spectrogram) and HiFiGAN (spectrogram-to-audio) models on Google Cloud TPUs. The implementation:
Set up TPU VM
Clone Repository
git clone https://github.com/yourusername/hifigan_tpu.git
cd hifigan_tpu
Install Dependencies
pip install -r requirements.txt
Run Inference
main.ipynb in JupyterThe are several optimizations for TPU inference:
The end-to-end pipeline includes:
./compilation_cache/13 commits
3 commits
Jupyter Notebook
67.5%
Python
32.4%
Run NVIDIA's FastPitch and HiFiGAN text-to-speech models on Google Cloud TPUs using PyTorch/XLA, achieving real-time factors (RTF) of up to 160x.
| TPU Version | End-to-End Latency | RTF (approx.) |
|---|---|---|
| v3 | 230ms | 125x |
| v5e | 50-60ms | 140x |
| v5p | 40-50ms | 160x |
*Benchmarks performed on ~7-8 second audio generations including padding
This repository demonstrates how to run NVIDIA's FastPitch (text-to-spectrogram) and HiFiGAN (spectrogram-to-audio) models on Google Cloud TPUs. The implementation:
Set up TPU VM
Clone Repository
git clone https://github.com/yourusername/hifigan_tpu.git
cd hifigan_tpu
Install Dependencies
pip install -r requirements.txt
Run Inference
main.ipynb in JupyterThe are several optimizations for TPU inference:
The end-to-end pipeline includes:
./compilation_cache/13 commits
3 commits
Jupyter Notebook
67.5%
Python
32.4%