{"data":{"slug":"jik876-hifi-gan","name":"hifi-gan","tagline":"HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis","github_url":"https://github.com/jik876/hifi-gan","owner":"jik876","repo":"hifi-gan","owner_avatar_url":"https://avatars.githubusercontent.com/u/65878508?v=4","primary_language":"Python","stars":2353,"forks":555,"topics":["deep-learning","gan","hifi-gan","pytorch","speech-synthesis","text-to-speech","tts","vocoder"],"archived":false,"github_pushed_at":"2024-07-27T20:56:30+00:00","maintenance_label":"Dormant","url":"https://www.graphcanon.com/tools/jik876-hifi-gan","markdown_url":"https://www.graphcanon.com/tools/jik876-hifi-gan.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/jik876-hifi-gan","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=jik876-hifi-gan","description":"HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis","homepage_url":null,"license":"MIT","open_issues":111,"watchers":31,"ai_summary":null,"readme_excerpt":"# HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis\n\n### Jungil Kong, Jaehyeon Kim, Jaekyoung Bae\n\nIn our [paper](https://arxiv.org/abs/2010.05646), \nwe proposed HiFi-GAN: a GAN-based model capable of generating high fidelity speech efficiently.<br/>\nWe provide our implementation and pretrained models as open source in this repository.\n\n**Abstract :**\nSeveral recent work on speech synthesis have employed generative adversarial networks (GANs) to produce raw waveforms. \nAlthough such methods improve the sampling efficiency and memory usage, \ntheir sample quality has not yet reached that of autoregressive and flow-based generative models. \nIn this work, we propose HiFi-GAN, which achieves both efficient and high-fidelity speech synthesis. \nAs speech audio consists of sinusoidal signals with various periods, \nwe demonstrate that modeling periodic patterns of an audio is crucial for enhancing sample quality. \nA subjective human evaluation (mean opinion score, MOS) of a single speaker dataset indicates that our proposed method \ndemonstrates similarity to human quality while generating 22.05 kHz high-fidelity audio 167.9 times faster than \nreal-time on a single V100 GPU. We further show the generality of HiFi-GAN to the mel-spectrogram inversion of unseen \nspeakers and end-to-end speech synthesis. Finally, a small footprint version of HiFi-GAN generates samples 13.4 times \nfaster than real-time on CPU with comparable quality to an autoregressive counterpart.\n\nVisit our [demo website](https://jik876.github.io/hifi-gan-demo/) for audio samples.\n\n\n## Pre-requisites\n1. Python >= 3.6\n2. Clone this repository.\n3. Install python requirements. Please refer [requirements.txt](requirements.txt)\n4. Download and extract the [LJ Speech dataset](https://keithito.com/LJ-Speech-Dataset/).\nAnd move all wav files to `LJSpeech-1.1/wavs`\n\n\n## Training\n```\npython train.py --config config_v1.json\n```\nTo train V2 or V3 Generator, replace `config_v1.json` with `config_v2.json` or `config_v3.json`.<br>\nCheckpoints and copy of the configuration file are saved in `cp_hifigan` directory by default.<br>\nYou can change the path by adding `--checkpoint_path` option.\n\nValidation loss during training with V1 generator.<br>\n\n\n## Pretrained Model\nYou can also use pretrained models we provide.<br/>\n[Download pretrained models](https://drive.google.com/drive/folders/1-eEYTB5Av9jNql0WGBlRoi-WH2J7bp5Y?usp=sharing)<br/> \nDetails of each folder are as in follows:\n\n|Folder Name|Generator|Dataset|Fine-Tuned|\n|------|---|---|---|\n|LJ_V1|V1|LJSpeech|No|\n|LJ_V2|V2|LJSpeech|No|\n|LJ_V3|V3|LJSpeech|No|\n|LJ_FT_T2_V1|V1|LJSpeech|Yes ([Tacotron2](https://github.com/NVIDIA/tacotron2))|\n|LJ_FT_T2_V2|V2|LJSpeech|Yes ([Tacotron2](https://github.com/NVIDIA/tacotron2))|\n|LJ_FT_T2_V3|V3|LJSpeech|Yes ([Tacotron2](https://github.com/NVIDIA/tacotron2))|\n|VCTK_V1|V1|VCTK|No|\n|VCTK_V2|V2|VCTK|No|\n|VCTK_V3|V3|VCTK|No|\n|UNIVERSAL_V1|V1|Universal|No|\n\nWe provide the universal model with discriminator weights that can be used as a base for transfer learning to other datasets.\n\n## Fine-Tuning\n1. Generate mel-spectrograms in numpy format using [Tacotron2](https://github.com/NVIDIA/tacotron2) with teacher-forcing.<br/>\nThe file name of the generated mel-spectrogram should match the audio file and the extension should be `.npy`.<br/>\nExample:\n    ```\n    Audio File : LJ001-0001.wav\n    Mel-Spectrogram File : LJ001-0001.npy\n    ```\n2. Create `ft_dataset` folder and copy the generated mel-spectrogram files into it.<br/>\n3. Run the following command.\n    ```\n    python train.py --fine_tuning True --config config_v1.json\n    ```\n    For other command line options, please refer to the training section.\n\n\n## Inference from wav file\n1. Make `test_files` directory and copy wav files into the directory.\n2. Run the following command.\n    ```\n    python inference.py --checkpoint_file [generator checkpoint file path]\n    ```\nGenerated wav files are saved in `generated_files`","github_created_at":"2020-10-14T10:33:18+00:00","created_at":"2026-07-11T12:08:53.607398+00:00","updated_at":"2026-07-11T12:08:59.075437+00:00","categories":[{"slug":"inference-serving","name":"Inference & Serving","url":"https://www.graphcanon.com/categories/inference-serving","markdown_url":"https://www.graphcanon.com/categories/inference-serving.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/inference-serving"},{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"},{"slug":"speech-audio","name":"Speech & Audio","url":"https://www.graphcanon.com/categories/speech-audio","markdown_url":"https://www.graphcanon.com/categories/speech-audio.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/speech-audio"}],"tags":[{"slug":"deep-learning","name":"deep-learning"},{"slug":"gan","name":"gan"},{"slug":"hifi-gan","name":"hifi-gan"},{"slug":"pytorch","name":"pytorch"},{"slug":"speech-synthesis","name":"speech-synthesis"},{"slug":"text-to-speech","name":"text-to-speech"},{"slug":"tts","name":"tts"},{"slug":"vocoder","name":"vocoder"}],"trust":{"provenance":{"is_fork":false,"github_id":303981258,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-11T12:08:54.263Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":713,"last_release_at":null},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":37,"high_count":0,"last_scan_at":"2026-07-11T12:08:55.359Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-07-11T12:08:54.978Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-07-11T12:08:54.978Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-07-11T12:08:54.978Z"}}}}