Snac 24khz Hindi Ft
A SNAC 24 kHz multi-scale neural audio codec wh ose decoder has been fine-tuned on Hindi / Hinglish speech. It serves as the vocoder (SNAC-token → waveform detokenizer) for a Orpheus styled TTS stack.
Model source
- Kind
- Other
- File size
- 75.8 MB
- Base model
- hubertsiuzdak/snac_24khz
- Version
- vRevision ac99b9a
- Updated
- Oct 11, 2026
- Downloads
- 14
- Source
- Hugging Face
Source description
SNAC 24 kHz — Hindi
A SNAC 24 kHz multi-scale neural audio codec wh ose decoder has been fine-tuned on Hindi / Hinglish speech. It serves as the vocoder (SNAC-token → waveform detokenizer) for a Orpheus styled TTS stack.
Only the decoder was fine-tuned — the encoder and quantizer are frozen from the base
hubertsiuzdak/snac_24khz. The code
space is therefore identical to the base model, so this checkpoint is a drop-in decoder
replacement: any SNAC code24khz` decode here with no retraining and no re-tokenizing.
Model details
| Base | `hubertsiuzdak/snac |
| Output | 24 kHz, mono |
| Codebooks | 3 hierarchical levels, 4096 entries each |
| Frame layout | 7 tokens / ine) |
| Parameters | ~19.8 M |
| Fine-tuned | decoder only |
Installation
pip install snac torch sound
Usage
1. Round-trip: audio → c
import torch, soundfile as s
from snac import SNAC
device = "cuda" if torch.cud
model = SNAC.from_pretrained("nullHawk/snac-24khz-hindi-hp").eval().to(device)
wav, sr = sf.read("input.wavt be 24 kHz (resample first if
not)
audio = torch.from_numpy(wavce) # shape [1, 1, T]
with torch.inference_mode():
codes = model.encode(aud LongTensors (coarse -> fine)
recon = model.decode(codes) # [1, 1, T'] waveform
sf.write("recon.wav", recon[
2. Decode from a flat SN
TTS LLMs (Orpheus SNAC tokens, 7 per frame, interleaved across the 3 lev:
import torch
def decode_snac_tokens(ids,
"""ids : flat list of
offset: subtract your LLM's SNAC base id (use 0 if ids are already in [0, 4096)).
"""
ids = [(t - offset) % 40
frames = len(ids) // 7
l1, l2, l3 = [], [], []
for i in range(frames):
s = ids[i * 7:(i + 1) * 7]
l1.append(s[0])
l2 += [s[1], s[4]]
l3 += [s[2], s[3], s
dev = next(model.parameters()).device
codes = [torch.tensor(x,)[None] for x in (l1, l2, l3)]
with torch.inference_mode():
z_q = model.quantize
audio = model.decoder(z_q)[0, 0].cpu().numpy()
return audio[2048:] ms decoder warm-up
# offset = the SNAC base tokg. 128266 for maya1 / Orpheus).
wav = decode_snac_tokens(token_ids, model, offset=128266)
import soundfile as sf
sf.write("tts.wav", wav, 24000)
Notes
- Only the decoder changed, tsiuzdak/snac_24khz` by swappin g the repo id — the encoded code
- Output is 24 kHz mono. Trim the first ~2048 samples of a freshly decoded clip to remov e the decoder warm-up transient.
Acknowledgements
Built on SNAC by Hubert Siuzdak.
Sources
1 source
Sources
1 sourceVerified Oct 11
Model artifacts
1 artifact
Model artifacts
1 artifactSource excerpts
3 excerpts
Source excerpts
3 excerpts--- license: mit library_name: snac tags: - audio - neural-audio-codec - snac - text-to-speech - vocoder - hindi - hinglish pipeline_tag: audio-to-audio base_model: - hubertsiuzdak/snac_24khz --- # SNAC 24 kHz — Hindi A [SNAC](https://github.com/hubertsiuzdak/snac) 24 kHz multi-scale neural audio codec wh ose **decoder has been fine-tuned on Hindi / Hinglish speech**. It serves as the vocoder (SNAC-token → waveform detokenizer) for a Orpheus styled TTS stack. Only the **decoder** was fine-tuned — the encoder and quantizer are frozen from the base [`hubertsiuzdak/snac_24khz`](https://huggingface.co/hubertsiuzdak/snac_24khz). The code space is therefore identical to the base model, so this checkpoint is a **drop-in decoder replacement**: any SNAC code24khz` decode here with no retraining and no re-tokenizing. ## Model details | | | |---|---| | Base | `hubertsiuzdak/snac | Output | 24 kHz, mono | | Codebooks | 3 hierarchical levels, 4096 entries each | | Frame layout | 7 tokens / ine) | | Parameters | ~19.8 M | | Fine-tuned | decoder only | ## Installation ```bash pip install snac torch sound ``` ## Usage ### 1. Round-trip: audio → c ```python import torch, soundfile as s from snac import SNAC device = "cuda" if torch.cud model = SNAC.from_pretrained("nullHawk/snac-24khz-hindi-hp").eval().to(device) wav, sr = sf.read("input.wavt be 24 kHz (resample first if not) audio = torch.from_numpy(wavce) # shape [1, 1, T] with torch.inference_mode(): codes = model.encode(aud LongTensors (coarse -> fine) recon = model.decode(codes) # [1, 1, T'] waveform sf.write("recon.wav", recon[ ``` ### 2. Decode from a flat SN TTS LLMs (Orpheus SNAC tokens, 7 per frame, interleaved across the 3 lev: ```python import torch def decode_snac_tokens(ids, """ids : flat list of offset: subtract your LLM's SNAC base id (use 0 if ids are already in [0, 4096)). """ ids = [(t - offset) % 40 frames = len(ids) // 7 l1, l2, l3 = [], [], [] for i in range(frames): s = ids[i * 7:(i + 1) * 7] l1.append(s[0]) l2 += [s[1], s[4]] l3 += [s[2], s[3], s dev = next(model.parameters()).device codes = [torch.tensor(x,)[None] for x in (l1, l2, l3)] with torch.inference_mode(): z_q = model.quantize audio = model.decoder(z_q)[0, 0].cpu().numpy() return audio[2048:] ms decoder warm-up ``` ```python # offset = the SNAC base tokg. 128266 for maya1 / Orpheus). wav = decode_snac_...
Source context: 14 downloads · 0 likes · Pipeline audio-to-audio · Library snac · Repo nullHawk/snac-24khz-hindi-ft
Source context: 24 downloads · 0 likes · Pipeline audio-to-audio · Library snac · Repo nullHawk/snac-24khz-hindi-ft
