LSCodec 25 Hz (self-trained)
Self-trained checkpoints for LSCodec — a low-bitrate, speaker-decoupled discrete speech codec (paper · demo).
This repo hosts a 25 Hz variant trained from scratch with the official three-stage
recipe (VAE → VQ → vocoder). It is API-compatible with the official
cantabile-kwok/lscodec_25hz release and can be used as a drop-in pretrained_25hz/
directory.
Model summary
| Property | Value |
|---|---|
| Token rate | 25 Hz |
| Codebook | 1 group × 1024 entries × 64 dim (codebook.npy, shape (1, 1024, 64)) |
| SSL prompt features | WavLM-Large (last layer) |
| Output sample rate | 24 kHz |
| Training budget | 800k steps (non-causal) |
Files
| File | Description |
|---|---|
lscodec_encoder.pt |
Encoder checkpoint (waveform → tokens) |
lscodec_vocoder.pt |
Vocoder checkpoint (tokens + prompt → 24 kHz waveform) |
codebook.npy |
VQ codebook, (1, 1024, 64) |
encoder_config.yml |
Encoder config |
vocoder_config.yml |
Vocoder config |
Note:
WavLM-Large.ptis not included (it is the base SSL model, not a self-trained weight). Download it from the official WavLM repo and place (or symlink) it into the same directory before running inference.
Usage
Download the checkpoints into a pretrained_25hz/-style directory:
hf download Icerm/lscodec_25hz_trained --local-dir pretrained_25hz_trained
# then add WavLM-Large.pt into pretrained_25hz_trained/ (download or symlink)
Encode waveforms to tokens and vocode back with a reference prompt (see the LSCodec README for full docs):
source path.sh
# Encode + vocode in one step
recon_with_prompt.py \
--wav-scp example/wav.scp \
--prompt-wav-scp example/prompt.scp \
--outdir example/wav \
--pretrained-dir pretrained_25hz_trained/
These checkpoints are non-causal. For low-latency, chunk-based reconstruction use
the windowed overlap inference script
(lscodec/streaming/stream_recon_noncausal.py).
Citation
@inproceedings{guo25_interspeech,
title = {{LSCodec: Low-Bitrate and Speaker-Decoupled Discrete Speech Codec}},
author = {Yiwei Guo and Zhihan Li and Chenpeng Du and Hankun Wang and Xie Chen and Kai Yu},
year = {2025},
booktitle = {{Interspeech 2025}},
pages = {5018--5022},
doi = {10.21437/Interspeech.2025-1106},
issn = {2958-1796},
}