hifi-gan logo

hifi-gan

jik876/hifi-gan

Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis

GraphCanon updated 3w · GitHub synced 3w

2.4k stars555 forksLast push 2y Python MIT

Decision brief

HiFi-GAN is optimized for generating high-fidelity speech efficiently and supports both training from scratch and fine-tuning with pretrained models.

Good fit when

  • When you require real-time generation capabilities up to 167.9 times faster than real time on a single V100 GPU, or even 13.4 times faster on CPU than real time for the small footprint version
  • If fine-tuning pretrained models for speech synthesis quality on unseen speakers is needed

Avoid when

  • If your application prioritizes sample quality above speed, despite the competitive position of HiFi-GAN in both criteria
  • When the computational resources for running models on a V100 GPU or leveraging the small footprint version's CPU efficiency are not available

Observed Jul 16, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Dormant (731d since push)
As of 3w
Provenance
Not a fork · Personal account
As of 3w
Security (OSV)
37 low (37 low)
As of 1mo

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

pip install hifi-gan
PyPI

Similar tools

Same-category neighbours. No typed graph edges are catalogued for this tool yet.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

HiFi-GAN is a GAN-based model aimed at achieving both efficient and high-fidelity speech synthesis.

Capability facts

Languages
python

Source: github.language · Jul 29, 2026

Categories

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Python runtimePython

Source: README excerpt (regex_v1, Jul 29, 2026)

1. Python >= 3.6
Source link

Tags

README

HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis

Jungil Kong, Jaehyeon Kim, Jaekyoung Bae

In our paper, we proposed HiFi-GAN: a GAN-based model capable of generating high fidelity speech efficiently.
We provide our implementation and pretrained models as open source in this repository.

Abstract : Several recent work on speech synthesis have employed generative adversarial networks (GANs) to produce raw waveforms. Although such methods improve the sampling efficiency and memory usage, their sample quality has not yet reached that of autoregressive and flow-based generative models. In this work, we propose HiFi-GAN, which achieves both efficient and high-fidelity speech synthesis. As speech audio consists of sinusoidal signals with various periods, we demonstrate that modeling periodic patterns of an audio is crucial for enhancing sample quality. A subjective human evaluation (mean opinion score, MOS) of a single speaker dataset indicates that our proposed method demonstrates similarity to human quality while generating 22.05 kHz high-fidelity audio 167.9 times faster than real-time on a single V100 GPU. We further show the generality of HiFi-GAN to the mel-spectrogram inversion of unseen speakers and end-to-end speech synthesis. Finally, a small footprint version of HiFi-GAN generates samples 13.4 times faster than real-time on CPU with comparable quality to an autoregressive counterpart.

Visit our demo website for audio samples.

Pre-requisites

  1. Python >= 3.6
  2. Clone this repository.
  3. Install python requirements. Please refer requirements.txt
  4. Download and extract the LJ Speech dataset. And move all wav files to LJSpeech-1.1/wavs

Training

python train.py --config config_v1.json

To train V2 or V3 Generator, replace config_v1.json with config_v2.json or config_v3.json.
Checkpoints and copy of the configuration file are saved in cp_hifigan directory by default.
You can change the path by adding --checkpoint_path option.

Validation loss during training with V1 generator.

Pretrained Model

You can also use pretrained models we provide.
Download pretrained models
Details of each folder are as in follows:

Folder NameGeneratorDatasetFine-Tuned
LJ_V1V1LJSpeechNo
LJ_V2V2LJSpeechNo
LJ_V3V3LJSpeechNo
LJ_FT_T2_V1V1LJSpeechYes (Tacotron2)
LJ_FT_T2_V2V2LJSpeechYes (Tacotron2)
LJ_FT_T2_V3V3LJSpeechYes (Tacotron2)
VCTK_V1V1VCTKNo
VCTK_V2V2VCTKNo
VCTK_V3V3VCTKNo
UNIVERSAL_V1V1UniversalNo

We provide the universal model with discriminator weights that can be used as a base for transfer learning to other datasets.

Fine-Tuning

  1. Generate mel-spectrograms in numpy format using Tacotron2 with teacher-forcing.
    The file name of the generated mel-spectrogram should match the audio file and the extension should be .npy.
    Example:
    Audio File : LJ001-0001.wav
    Mel-Spectrogram File : LJ001-0001.npy
    
  2. Create ft_dataset folder and copy the generated mel-spectrogram files into it.
  3. Run the following command.
    python train.py --fine_tuning True --config config_v1.json
    
    For other command line options, please refer to the training section.

Inference from wav file

  1. Make test_files directory and copy wav files into the directory.
  2. Run the following command.
    python inference.py --checkpoint_file [generator checkpoint file path]
    

Generated wav files are saved in generated_files

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.