← Open Source
hubertsiuzdak

snac

Multi-Scale Neural Audio Codec (SNAC) compresses audio into discrete codes at a low bitrate.

ModelsAudio/Speech modelsPython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
777
Stars
46
Forks
+1
This week
2
Contributors
Created 2024-02-20 · Updated 2026-10-14 · #13935 today
Top developers
hubertsiuzdakAPengX

hubertsiuzdak/snac is ranked 13,935 with 777 stars.

Same-category comparison

hubertsiuzdak/snac is ranked 13,935 among these 8 peers; youngwanLEE/centermask2 is ranked 13,928.

Same-category comparison
NameRankMetrics
black-forest-labs/Self-Flow13,917
Language:
Python
Stars:
778
Forks:
27
Description:
[ICML'26] Code and website for Self-Flow: Self-Supervised Flow Matching for Scalable Multi-Modal Synthesis.
bryanswkim/Chain-of-Zoom13,919
Language:
Python
Stars:
778
Forks:
76
Description:
[NeurIPS'25 Spotlight] Official repository for "Chain-of-Zoom: Extreme Super-Resolution via Scale Autoregression and Preference Alignment".
bytedance/ibot13,920
Language:
Jupyter Notebook
Stars:
778
Forks:
93
Description:
iBOT :robot:: Image BERT Pre-Training with Online Tokenizer (ICLR 2022).
youngwanLEE/centermask213,928
Language:
Python
Stars:
778
Forks:
154
Description:
[CVPR 2020] CenterMask : Real-time Anchor-Free Instance Segmentation.
Tsingularity/dift13,959
Language:
Python
Stars:
774
Forks:
50
Description:
[NeurIPS'23] Emergent Correspondence from Image Diffusion.
LLaVA-VL/LLaVA-Plus-Codebase13,990
Language:
Python
Stars:
771
Forks:
60
Description:
LLaVA-Plus: Large Language and Vision Assistants that Plug and Learn to Use Skills.
yiranran/Audio-driven-TalkingFace-HeadPose14,009
Language:
Python
Stars:
770
Forks:
146
Description:
Code for "Audio-driven Talking Face Video Generation with Learning-based Personalized Head Pose" (Arxiv 2020) and "Predicting Personalized Head Movement From Short Video and Speech Signal" (TMM 2022).
showlab/X-Adapter14,022
Language:
Python
Stars:
769
Forks:
41
Description:
[CVPR 2024] X-Adapter: Adding Universal Compatibility of Plugins for Upgraded Diffusion Model.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModels
SubcategoryAudio/Speech models
KeywordsAudio production
Stars777
Forks46
Contributors2
Created date2024-02-20
Updated date2026-10-14
Stars in 1 day0
Stars in 7 days1
Rank13,935
Previous rank6,439
Rank change-7,496
7-day stars rank10,712
Previous 7-day stars rank10,768
7-day stars rank change56
Total stars rank13,672
Previous total stars rank13,645
Total stars rank change-27
CountryPoland
README summary

SNAC 🍿 Multi-**S**cale **N**eural **A**udio **C**odec (SNAC) compresses audio into discrete codes at a low bitrate. However, SNAC introduces a simple change where coarse tokens are sampled less frequently, covering a broader time span (see the image on the right). This can not only save on bitrate, but more importantly this might be very useful for language modeling approaches to audio generation. with coarse tokens of ~10 Hz and a context window of 2048 you can

effectively model a consistent structure of an audio track for ~3 minutes. Pretrained models Currently, all models support only single audio channel (mono). 8 M | 🗣️ Speech | | hubertsiuzdak/snac_32khz | 1. 5 M | 🎸 Music / Sound Effects | | hubertsiuzdak/snac_44khz | 2. 5 M | 🎸 Music / Sound Effects | Usage Install it using: To encode (and decode) audio with SNAC in Python, use the following code: You can also encode and reconstruct in a single call: ⚠️ Note that is a list of token sequences of

variable lengths, each corresponding to a different temporal resolution. Acknowledgements Module definitions are adapted from the Descript Audio Codec. Citation If this code contributes to your research, please cite our work:

Frequently asked questions

How many stars and forks are recorded?

hubertsiuzdak/snac has 777 stars and 46 forks.

What is the repository rank?

hubertsiuzdak/snac is ranked 13,935.

What language and category are recorded?

hubertsiuzdak/snac has 777 stars, uses Python and belongs to Models.

Which repository is closest in rank?

hubertsiuzdak/snac is compared with youngwanLEE/centermask2, ranked 13,928 with 778 stars.

README

SNAC 🍿

Multi-Scale Neural Audio Codec (SNAC) compresses audio into discrete codes at a low bitrate. For more information, read the paper: https://arxiv.org/abs/2410.14411

🎸 Music samples 🗣️ Speech samples

🎧 More audio samples available at https://hubertsiuzdak.github.io/snac/

Overview

SNAC encodes audio into hierarchical tokens similarly to SoundStream, EnCodec, and DAC (see the image on the left). However, SNAC introduces a simple change where coarse tokens are sampled less frequently, covering a broader time span (see the image on the right).

This can not only save on bitrate, but more importantly this might be very useful for language modeling approaches to audio generation. E.g. with coarse tokens of ~10 Hz and a context window of 2048 you can effectively model a consistent structure of an audio track for ~3 minutes.

Pretrained models

Currently, all models support only single audio channel (mono).

Model Bitrate Sample Rate Params Recommended use case
hubertsiuzdak/snac_24khz 0.98 kbps 24 kHz 19.8 M 🗣️ Speech
hubertsiuzdak/snac_32khz 1.9 kbps 32 kHz 54.5 M 🎸 Music / Sound Effects
hubertsiuzdak/snac_44khz 2.6 kbps 44 kHz 54.5 M 🎸 Music / Sound Effects

Usage

Install it using:

pip install snac

To encode (and decode) audio with SNAC in Python, use the following code:

import torch
from snac import SNAC

model = SNAC.from_pretrained("hubertsiuzdak/snac_32khz").eval().cuda()
audio = torch.randn(1, 1, 32000).cuda()  # placeholder for actual audio with shape (B, 1, T)

with torch.inference_mode():
    codes = model.encode(audio)
    audio_hat = model.decode(codes)

You can also encode and reconstruct in a single call:

with torch.inference_mode():
    audio_hat, codes = model(audio)

⚠️ Note that codes is a list of token sequences of variable lengths, each corresponding to a different temporal resolution.

>>> [code.shape[1] for code in codes]
[12, 24, 48, 96]

Acknowledgements

Module definitions are adapted from the Descript Audio Codec.

Citation

If this code contributes to your research, please cite our work:

@inproceedings{siuzdak2024snac,
  title={SNAC: Multi-Scale Neural Audio Codec},
  author={Siuzdak, Hubert and Gr{\"o}tschla, Florian and Lanzend{\"o}rfer, Luca A},
  booktitle={Audio Imagination: NeurIPS 2024 Workshop AI-Driven Speech, Music, and Sound Generation},
  year={2024}
}
Nearby in the ranking
Similar items