{"id":13449151,"url":"https://github.com/enhuiz/vall-e","last_synced_at":"2025-05-15T09:03:55.510Z","repository":{"id":65219847,"uuid":"587701234","full_name":"enhuiz/vall-e","owner":"enhuiz","description":"An unofficial PyTorch implementation of the audio LM VALL-E ","archived":false,"fork":false,"pushed_at":"2023-05-10T05:55:34.000Z","size":2001,"stargazers_count":2990,"open_issues_count":71,"forks_count":417,"subscribers_count":87,"default_branch":"main","last_synced_at":"2025-03-31T02:11:50.461Z","etag":null,"topics":["audio-lm","pytorch","text-to-speech","tts","vall-e","valle"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enhuiz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-01-11T11:32:21.000Z","updated_at":"2025-03-29T13:19:02.000Z","dependencies_parsed_at":"2024-01-14T15:09:52.762Z","dependency_job_id":null,"html_url":"https://github.com/enhuiz/vall-e","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enhuiz%2Fvall-e","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enhuiz%2Fvall-e/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enhuiz%2Fvall-e/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enhuiz%2Fvall-e/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enhuiz","download_url":"https://codeload.github.com/enhuiz/vall-e/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247584110,"owners_count":20962075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio-lm","pytorch","text-to-speech","tts","vall-e","valle"],"created_at":"2024-07-31T06:00:32.309Z","updated_at":"2025-04-07T03:16:22.312Z","avatar_url":"https://github.com/enhuiz.png","language":"Python","funding_links":["https://www.buymeacoffee.com/enhuiz"],"categories":["Python","语音合成","Audio models"],"sub_categories":["网络服务_其他"],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"./vall-e.png\" width=\"500px\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n# VALL-E\n\nAn unofficial PyTorch implementation of [VALL-E](https://valle-demo.github.io/), based on the [EnCodec](https://github.com/facebookresearch/encodec) tokenizer.\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/enhuiz)\n\n## Get Started\n\n\u003e A toy Google Colab example: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1wEze0kQ0gt9B3bQmmbtbSXCoCTpq5vg-?usp=sharing).\n\u003e Please note that this example overfits a single utterance under the `data/test` and is not usable.\n\u003e The pretrained model is yet to come. \n\n### Requirements\n\nSince the trainer is based on [DeepSpeed](https://github.com/microsoft/DeepSpeed#requirements), you will need to have a GPU that DeepSpeed has developed and tested against, as well as a CUDA or ROCm compiler pre-installed to install this package.\n\n### Install\n\n```\npip install git+https://github.com/enhuiz/vall-e\n```\n\nOr you may clone by:\n\n```\ngit clone --recurse-submodules https://github.com/enhuiz/vall-e.git\n```\n\nNote that the code is only tested under `Python 3.10.7`.\n\n### Train\n\n1. Put your data into a folder, e.g. `data/your_data`. Audio files should be named with the suffix `.wav` and text files with `.normalized.txt`.\n\n2. Quantize the data:\n\n```\npython -m vall_e.emb.qnt data/your_data\n```\n\n3. Generate phonemes based on the text:\n\n```\npython -m vall_e.emb.g2p data/your_data\n```\n\n4. Customize your configuration by creating `config/your_data/ar.yml` and `config/your_data/nar.yml`. Refer to the example configs in `config/test` and `vall_e/config.py` for details. You may choose different model presets, check `vall_e/vall_e/__init__.py`.\n\n5. Train the AR or NAR model using the following scripts:\n\n```\npython -m vall_e.train yaml=config/your_data/ar_or_nar.yml\n```\n\nYou may quit your training any time by just typing `quit` in your CLI. The latest checkpoint will be automatically saved.\n\n### Export\n\nBoth trained models need to be exported to a certain path. To export either of them, run:\n\n```\npython -m vall_e.export zoo/ar_or_nar.pt yaml=config/your_data/ar_or_nar.yml\n```\n\nThis will export the latest checkpoint.\n\n### Synthesis\n\n```\npython -m vall_e \u003ctext\u003e \u003cref_path\u003e \u003cout_path\u003e --ar-ckpt zoo/ar.pt --nar-ckpt zoo/nar.pt\n```\n\n## TODO\n\n- [x] AR model for the first quantizer\n- [x] Audio decoding from tokens\n- [x] NAR model for the rest quantizers\n- [x] Trainers for both models\n- [x] Implement AdaLN for NAR model.\n- [x] Sample-wise quantization level sampling for NAR training.\n- [ ] Pre-trained checkpoint and demos on LibriTTS\n- [x] Synthesis CLI\n\n## Notice\n\n- [EnCodec](https://github.com/facebookresearch/encodec) is licensed under CC-BY-NC 4.0. If you use the code to generate audio quantization or perform decoding, it is important to adhere to the terms of their license.\n\n## Citations\n\n```bibtex\n@article{wang2023neural,\n  title={Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers},\n  author={Wang, Chengyi and Chen, Sanyuan and Wu, Yu and Zhang, Ziqiang and Zhou, Long and Liu, Shujie and Chen, Zhuo and Liu, Yanqing and Wang, Huaming and Li, Jinyu and others},\n  journal={arXiv preprint arXiv:2301.02111},\n  year={2023}\n}\n```\n\n```bibtex\n@article{defossez2022highfi,\n  title={High Fidelity Neural Audio Compression},\n  author={Défossez, Alexandre and Copet, Jade and Synnaeve, Gabriel and Adi, Yossi},\n  journal={arXiv preprint arXiv:2210.13438},\n  year={2022}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenhuiz%2Fvall-e","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenhuiz%2Fvall-e","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenhuiz%2Fvall-e/lists"}