LSCodec 25 Hz v3 (self-trained)

Self-trained v3 checkpoints for LSCodec — a low-bitrate, speaker-decoupled discrete speech codec (paper · demo).

This repo hosts a 25 Hz variant trained 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.

Compared with Icerm/lscodec_25hz_trained, this v3 package is a later training run (stage-2 VQ @ 250k steps, stage-3 vocoder @ 208k steps).

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 Stage-2 250k / Stage-3 208k (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
ptl/lscodec_encoder.ptl PyTorch Mobile encoder (traced from the released .pt)
ptl/lscodec_vocoder.ptl PyTorch Mobile vocoder (traced from the released .pt; no token repeat baked in — feed 50 Hz VQ vectors)

Note: WavLM-Large.pt is 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_v3 --local-dir pretrained_25hz_v3
# then add WavLM-Large.pt into pretrained_25hz_v3/ (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_v3/

These checkpoints are non-causal. For low-latency, chunk-based reconstruction use the sliding-window streaming script (defaults to a 320 ms prompt-normalization anchor):

python lscodec/streaming/stream_recon_sliding.py \
    --wav-scp example/wav.scp \
    --prompt-wav-scp example/prompt_self.scp \
    --outdir example/stream_v3 \
    --pretrained-dir pretrained_25hz_v3/

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},
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for Icerm/lscodec_25hz_v3