{"id":17176146,"url":"https://github.com/haydenshively/soundstream","last_synced_at":"2025-08-17T18:08:28.329Z","repository":{"id":174320410,"uuid":"652048713","full_name":"haydenshively/SoundStream","owner":"haydenshively","description":"Implementation of SoundStream, an end-to-end neural audio codec","archived":false,"fork":false,"pushed_at":"2023-06-11T02:17:22.000Z","size":233,"stargazers_count":20,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-27T01:36:58.663Z","etag":null,"topics":["audio-compression","deep-learning"],"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/haydenshively.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-10T23:21:50.000Z","updated_at":"2025-07-27T01:34:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"897254af-5499-472a-a44b-9e36b155a36a","html_url":"https://github.com/haydenshively/SoundStream","commit_stats":null,"previous_names":["haydenshively/soundstream"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/haydenshively/SoundStream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenshively%2FSoundStream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenshively%2FSoundStream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenshively%2FSoundStream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenshively%2FSoundStream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haydenshively","download_url":"https://codeload.github.com/haydenshively/SoundStream/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenshively%2FSoundStream/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270885527,"owners_count":24662468,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-compression","deep-learning"],"created_at":"2024-10-14T23:59:16.553Z","updated_at":"2025-08-17T18:08:28.321Z","avatar_url":"https://github.com/haydenshively.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SoundStream - PyTorch\nImplementation of [SoundStream](https://arxiv.org/abs/2107.03312), an end-to-end neural audio codec\n\n![Figure 2 from the SoundStream paper](images/figure2.png)\n\n- 🔊 Implements SoundStream model inference\n- 🎛️ Works with 27M parameter [model](https://huggingface.co/haydenshively/SoundStream/) pretrained on 10k hours of English speech ([Multilingual LibriSpeech](https://www.openslr.org/94/) dataset)\n\n## Install\n```bash\npip install soundstream\n```\n\n## Usage\n\n\u003e **Note**\n\u003e The pretrained model is configured as specified in [NaturalSpeech 2](https://arxiv.org/abs/2304.09116), so it has different channels/strides than the original SoundStream.\n\n```Python\nimport torchaudio\n\nfrom soundstream import from_pretrained, load\n\n\nwaveform = load('in.wav')\naudio_codec = from_pretrained()  # downloads model from Hugging Face\n\nquantized = audio_codec(waveform, mode='encode')\nrecovered = audio_codec(quantized, mode='decode')\n\ntorchaudio.save('out.wav', recovered[0], 16000)\n```\n\n## Citations\n\n### Code\n\n- https://github.com/descriptinc/melgan-neurips\n- https://github.com/lucidrains/audiolm-pytorch\n- https://github.com/wesbz/SoundStream\n\n### Papers\n\n```bibtex\n@misc{zeghidour2021soundstream,\n      title={SoundStream: An End-to-End Neural Audio Codec}, \n      author={Neil Zeghidour and Alejandro Luebs and Ahmed Omran and Jan Skoglund and Marco Tagliasacchi},\n      year={2021},\n      eprint={2107.03312},\n      archivePrefix={arXiv},\n      primaryClass={cs.SD}\n}\n```\n\n```bibtex\n@misc{kumar2019melgan,\n      title={MelGAN: Generative Adversarial Networks for Conditional Waveform Synthesis}, \n      author={Kundan Kumar and Rithesh Kumar and Thibault de Boissiere and Lucas Gestin and Wei Zhen Teoh and Jose Sotelo and Alexandre de Brebisson and Yoshua Bengio and Aaron Courville},\n      year={2019},\n      eprint={1910.06711},\n      archivePrefix={arXiv},\n      primaryClass={eess.AS}\n}\n```\n\n```bibtex\n@misc{tagliasacchi2020seanet,\n      title={SEANet: A Multi-modal Speech Enhancement Network}, \n      author={Marco Tagliasacchi and Yunpeng Li and Karolis Misiunas and Dominik Roblek},\n      year={2020},\n      eprint={2009.02095},\n      archivePrefix={arXiv},\n      primaryClass={eess.AS}\n}\n```\n\n```bibtex\n@misc{shen2023naturalspeech,\n      title={NaturalSpeech 2: Latent Diffusion Models are Natural and Zero-Shot Speech and Singing Synthesizers}, \n      author={Kai Shen and Zeqian Ju and Xu Tan and Yanqing Liu and Yichong Leng and Lei He and Tao Qin and Sheng Zhao and Jiang Bian},\n      year={2023},\n      eprint={2304.09116},\n      archivePrefix={arXiv},\n      primaryClass={eess.AS}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaydenshively%2Fsoundstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaydenshively%2Fsoundstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaydenshively%2Fsoundstream/lists"}