Kodagithub.com/jacobbies

A neural audio codec for music, with a token path and a continuous path.

Koda turns 48 kHz stereo music into a sequence of latent frames, 93.75 per second, and decodes it two ways. The token path rounds each frame to nine codebook indices, 8.44 kbps, which is what you store, stream, or train a language model on. The continuous path skips the rounding and hands a generative model the latent itself. Both paths share one encoder and one decoder, trained together.

model
koda-3.1
training
100k steps, complete
codec size
22.2 M parameters
token bitrate
8.44 kbps
SI-SDR (mid), tokens
7.78 dB
SI-SDR (mid), continuous
8.83 dB

SI-SDR measures how closely the decoded waveform follows the original, in decibels; higher is closer. It is a fidelity check, not a listening score. The two figures above are the final checkpoint on all 96 held-out validation clips. Every number on this page comes from the run's validation telemetry or a tracked evaluation file.

listen

held-out clips · koda-3.1, final checkpoint
koda-3.1Chopin — Nocturne in D-flat, Op. 27 No. 2piano · validation · held out
0:00 / 0:20

The held-out recording at 48 kHz, uncompressed.

spectrogram · original ▏ tokens ▏ continuous
Spectrograms for Chopin — Nocturne in D-flat, Op. 27 No. 2

20 s excerpts from 8 held-out recordings (validation split — the model never trained on these recordings), decoded once from the koda-3.1 step-100,000 checkpoint. Excerpt windows are the centre 20 s of each recording, not hand-picked moments.

two paths, one decoder

tokens against continuous · 96 held-out clips

The paths differ only in what the decoder reads. The continuous path scores higher in every domain, and the gap is the cost of rounding the latent to 8.4 kbps. Piano, the largest share of the training data, reconstructs best.

tokenscontinuous
what the decoder reads9 codebook indices per frame128 real numbers per frame
bitrate8.44 kbpsnot a compressed stream
built forstorage, streaming, token modelsdiffusion and flow models
SI-SDR, mid (dB), all 96 clips7.788.83
piano · 40 clips11.0712.48
chamber · 24 clips6.967.71
orchestral · 24 clips5.356.15
mel distance, mid0.5420.530
channel-swap flip (−1 = placement kept)−0.71−0.76
Scores at step 100k, the checkpoint of record, over the full music validation set; the domain rows are its piano, chamber and orchestral subsets. The other 8 clips are guitar, choir, vocal, popular and one other classical recording.

against other codecs

25 held-out clips · same audio through every system

The token path against Opus, EnCodec (48 kHz) and DAC (44.1 kHz) at nearby bitrates. These scores are full left/right SI-SDR, which runs lower than the mid-channel figures above. On these clips the koda-3.1 token path measures SI-SDR 6.40 dB at 8.44 kbps.

systemkbps ↓SI-SDR (dB) ↑mel distance ↓ΔILD (dB) ↓ΔIPD (rad) ↓
EnCodec 48 kHz, 6 kbps6.066.420.5952.410.417
DAC 44 kHz, 4 codebooks6.236.390.4142.710.321
DAC 44 kHz, 5 codebooks7.797.790.3852.340.274
koda-3.1 tokens8.446.400.5962.570.379
Opus, 8 kbps8.76−0.131.6403.560.891
EnCodec 48 kHz, 12 kbps · higher rate12.129.070.5391.850.316
Opus, 12 kbps12.774.340.9033.560.891

At 8.4 kbps the token path lands with EnCodec at 6 kbps and DAC at four codebooks on SI-SDR, and DAC at five codebooks stays ahead at a slightly lower rate, so this is not a rate win. By source the token path leads EnCodec on solo piano and on MusicNet's chamber recordings, and trails it on the other orchestral and chamber sources. Opus at the same rate is far behind.

25 held-out clips from the music val set (up to 3 per source: piano, chamber, orchestral, choir, guitar, vocal, popular), every system decoding the same audio, scored on each clip's centre 4 s. One silent clip is excluded. SI-SDR is a waveform-alignment measure, not a listening score; these baselines are general-purpose codecs and koda-3.1 is not. ΔILD/ΔIPD are averaged over the true-stereo clips. Arrows mark the better direction.

training

koda-3.1 · validated every 500 steps

koda-3.1 trained from scratch for 100k steps on 318 hours of music: classical recordings, with MAESTRO's solo piano at half the hours, plus 91 hours of Creative Commons popular music from ccMixter, sampled so that about 90% of training batches were classical. The best continuous-path validation came at step 97,500; the final checkpoint, step 100k, is the one on this page.

SI-SDR, mid channel, 96 held-out clipshigher is better
-5051020k40k60k80k100k
dBtokenscontinuous

Both paths share the encoder and the decoder; they differ only in whether the decoder reads the quantized tokens or the continuous latent. The gap between the lines is what quantization to 8.4 kbps costs. Shown from step 5k; the first validations start near −40 dB.

channel-swap flip−1 is the target
0120k40k60k80k100k0: placement not carried
tokenscontinuous

Swap left and right at the input and correlate the two decodes' side channels, median over 8 fixed stereo clips: -1 means the placement travels through the codec, +1 means the side channel is a template that ignores the input.

ΔILD, tokenslower is better
24620k40k60k80k100k
dBtokens

Inter-channel level difference error: how far the left/right loudness balance of the decode is from the original's.

the previous codec: koda-2.4

44.1 kHz stereo piano · tokens only · complete

koda-2.4 was the piano-only predecessor: 44.1 kHz stereo, twelve codebooks at 10.34 kbps, trained mostly on MAESTRO. It ran 65,490 steps and was ended by its own pre-registered stopping rules; the clips below come from its best checkpoint, step 56,500. koda-3.1 keeps its convolutional encoder and decoder and changes the rest: 48 kHz, nine codebooks, a continuous path beside the tokens, and training data beyond solo piano.

koda-2.4Rachmaninoff — Étude-Tableau, Op. 33 No. 3 in C minorvalidation · held out
0:00 / 0:30

The held-out MAESTRO recording at 44.1 kHz, uncompressed.

spectrogram · original ▏ koda-2.4
Spectrograms for Rachmaninoff — Étude-Tableau, Op. 33 No. 3 in C minor

30 s excerpts from 4 held-out MAESTRO recordings (validation and test splits — the model never trained on these compositions), decoded once from the koda-2.4-msdisc step-56,500 checkpoint. Excerpt windows are the highest-energy 30 s of each recording's opening minutes, not hand-picked moments.

On all 177 held-out MAESTRO test recordings koda-2.4 measures SI-SDR 10.05 dB, ΔIPD 0.214 rad and ΔILD 1.59 dB at 10.34 kbps.

systemkbps ↓SI-SDR (dB) ↑ΔILD (dB) ↓ΔIPD (rad) ↓
koda-2.410.3410.051.590.214
Opus, 12 kbps12.772.454.250.928
Opus, 24 kbps24.8011.741.540.227

Phase placement (ΔIPD) matches Opus at 24 kbps, which spends 2.4 times the bits; Opus at a similar rate is far behind on every column. The registered miss was ΔILD: 1.59 dB against a 1.5 dB bar.

All 177 held-out MAESTRO test recordings, scored on each recording's centre 4 s. Opus is the only baseline run on the full split; the neural codecs were compared on one recording only and are not shown. Arrows mark the better direction.