{"id":18753505,"url":"https://github.com/lucadellalib/audiocodecs","last_synced_at":"2025-09-01T12:31:29.982Z","repository":{"id":261169310,"uuid":"860771264","full_name":"lucadellalib/audiocodecs","owner":"lucadellalib","description":"A collections of audio codecs with a standardized API","archived":false,"fork":false,"pushed_at":"2024-11-24T17:38:08.000Z","size":688,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-24T18:27:42.895Z","etag":null,"topics":["codec","dac","encodec","mimi","pytorch","quantization","self-supervised-learning","speech-coding","speech-language-model","speech-synthesis","speechtokenizer","text-to-speech","wavlm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucadellalib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-21T06:03:20.000Z","updated_at":"2024-11-24T17:38:11.000Z","dependencies_parsed_at":"2024-11-05T04:24:24.739Z","dependency_job_id":"c092fd1d-f3bf-4a6f-8e5a-355ef50bf2c0","html_url":"https://github.com/lucadellalib/audiocodecs","commit_stats":null,"previous_names":["lucadellalib/audiocodecs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucadellalib%2Faudiocodecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucadellalib%2Faudiocodecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucadellalib%2Faudiocodecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucadellalib%2Faudiocodecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucadellalib","download_url":"https://codeload.github.com/lucadellalib/audiocodecs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231690700,"owners_count":18411507,"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":["codec","dac","encodec","mimi","pytorch","quantization","self-supervised-learning","speech-coding","speech-language-model","speech-synthesis","speechtokenizer","text-to-speech","wavlm"],"created_at":"2024-11-07T17:26:03.068Z","updated_at":"2025-09-01T12:31:29.946Z","avatar_url":"https://github.com/lucadellalib.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎵 Audio Codecs\n\n![License](https://img.shields.io/github/license/lucadellalib/audiocodecs)\n![Stars](https://img.shields.io/github/stars/lucadellalib/audiocodecs?style=social)\n\nA collection of audio codecs with a **standardized API** for easy integration and benchmarking.\n\n---------------------------------------------------------------------------------------------------------\n\n## 🚀 Available Codecs\n\n- [BigCodec](https://arxiv.org/abs/2409.05377)\n- [DAC](https://arxiv.org/abs/2306.06546)\n- [EnCodec](https://arxiv.org/abs/2210.13438)\n- [EnCodec](https://arxiv.org/abs/2210.13438) + [Vocos](https://arxiv.org/abs/2306.00814)\n- [FocalCodec](https://arxiv.org/abs/2502.04465)\n- [Mimi](https://kyutai.org/Moshi.pdf)\n- [SemantiCodec](https://arxiv.org/abs/2405.00233)\n- [SpeechTokenizer](https://arxiv.org/abs/2308.16692)\n- [Stable Codec](https://arxiv.org/abs/2411.19842)\n- [WavLM k-means](https://arxiv.org/abs/2312.09747)\n- [WavTokenizer](https://arxiv.org/abs/2408.16532)\n\n---------------------------------------------------------------------------------------------------------\n\n## 🛠️️ Installation\n\nFirst of all, install [Python 3.8 or later](https://www.python.org).\n\nTo install the package **with all available codecs**, open a terminal and run:\n\n```bash\npip install audiocodecs@git+https://github.com/lucadellalib/audiocodecs.git@main#egg=audiocodecs[all]\n```\n\nIf you encounter issues (e.g. codec installation conflicts with certain PyTorch versions or platforms),\nyou can install the package **without codecs**, and install the codec manually as needed:\n\n```bash\npip install audiocodecs@git+https://github.com/lucadellalib/audiocodecs.git@main#egg=audiocodecs\n```\n\n---------------------------------------------------------------------------------------------------------\n\n## ▶️ Quickstart\n\nTo check the reconstruction quality of a codec, navigate to the `\u003cpath-to-repository\u003e/audiocodecs` directory and run:\n\n```bash\npython \u003ccodec-name\u003e.py\n```\n\nThis will generate a file named `reconstruction.wav` corresponding to `example.wav` in the same directory.\n\nTo use one of the available codecs in your script (for example EnCodec):\n\n```python\nimport torchaudio\nfrom audiocodecs import Encodec\n\naudio_file = \"audiocodecs/example.wav\"\nsig, sample_rate = torchaudio.load(audio_file)\nmodel = Encodec(sample_rate=sample_rate, orig_sample_rate=24000, num_codebooks=8)\nmodel.requires_grad_(False).eval()\ntoks = model.sig_to_toks(sig)\nrec_sig = model.toks_to_sig(toks)\ntorchaudio.save(\"reconstruction.wav\", rec_sig, sample_rate)\n```\n\n---------------------------------------------------------------------------------------------------------\n\n## 📈️ Downstream Tasks\n\nReference implementations of downstream tasks using these audio codecs can be found in the `downstream` directory.\n\n---------------------------------------------------------------------------------------------------------\n\n## @ Citing\n\n```\n@article{dellalibera2025focalcodec,\n    title   = {{FocalCodec}: Low-Bitrate Speech Coding via Focal Modulation Networks},\n    author  = {Luca {Della Libera} and Francesco Paissan and Cem Subakan and Mirco Ravanelli},\n    journal = {arXiv preprint arXiv:2502.04465},\n    year    = {2025},\n}\n```\n\n```\n@article{speechbrainV1,\n    title   = {Open-Source Conversational {AI} with {SpeechBrain} 1.0},\n    author  = {Mirco Ravanelli and Titouan Parcollet and Adel Moumen and Sylvain de Langen and Cem Subakan\n               and Peter Plantinga and Yingzhi Wang and Pooneh Mousavi and Luca {Della Libera} and Artem Ploujnikov\n               and Francesco Paissan and Davide Borra and Salah Zaiem and Zeyu Zhao and Shucong Zhang\n               and Georgios Karakasidis and Sung-Lin Yeh and Pierre Champion and Aku Rouhe and Rudolf Braun\n               and Florian Mai and Juan Zuluaga-Gomez and Seyed Mahed Mousavi and Andreas Nautsch and Ha Nguyen\n               and Xuechen Liu and Sangeet Sagar and Jarod Duret and Salima Mdhaffar and Ga{{\\\"e}}lle Laperri{{\\`e}}re\n               and Mickael Rouvier and Renato De Mori and Yannick Est{{\\`e}}ve},\n    journal = {Journal of Machine Learning Research (JMLR)},\n    year    = {2024},\n    volume  = {25},\n    number  = {333},\n    pages   = {1--11},\n}\n```\n\n```\n@article{ravanelli2021speechbrain,\n    title   = {{SpeechBrain}: A General-Purpose Speech Toolkit},\n    author  = {Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell\n               and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong\n               and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva\n               and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio},\n    journal = {arXiv preprint arXiv:2106.04624},\n    year    = {2021},\n}\n```\n\n---------------------------------------------------------------------------------------------------------\n\n## 📧 Contact\n\n[luca.dellalib@gmail.com](mailto:luca.dellalib@gmail.com)\n\n---------------------------------------------------------------------------------------------------------\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucadellalib%2Faudiocodecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucadellalib%2Faudiocodecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucadellalib%2Faudiocodecs/lists"}