Project notebook / Audio ML
ImplementedNeural Audio Codec & Vector Quantization
I implemented and trained a small nonlinear vector-quantized audio autoencoder with a learned encoder, decoder and discrete codebook, then compared measured reconstruction error to an 8-bit companding baseline.
What I built
- Implemented a NumPy encoder/decoder with tanh nonlinearities, vector-codebook nearest-neighbor assignments and a straight-through gradient approximation.
- Trained and measured the model on generated voiced signals, recording reconstruction MSE, signal-to-noise ratio, code utilization and index-only bitrate.
- Built a separate 8-bit μ-law companding comparison and WAV reconstruction output so both the compression tradeoff and its limitations are inspectable.
Experiments & checks
- On the local synthetic voiced corpus, 280 training steps reduced frame reconstruction MSE from 0.04164 to 0.01217, reaching 5.24 dB SNR. Five index bits per 64-sample frame imply 625 bit/s at 8 kHz before framing and model overhead. An 8-bit μ-law sample baseline achieved 37.89 dB SNR at 64 kbit/s on the same data. That quality gap is the important result—not a headline compression ratio.
Notes & limitations
A low bitrate on its own proves nothing. Compression, reconstruction fidelity, latency, packet loss and model cost pull in different directions; the representation has to earn its keep.
This is a small trained neural codec prototype, not a production-quality speech codec, neural audio tokenizer for a generative model, or proof of perceptual quality. The test audio is synthetic; headers, real transport, model weights and listening-test scores are excluded from the idealized index bitrate.
I can make the bitrate astonishingly small. Making the reconstructed audio sound good is the part that requires actual research.
Screenshots & media

Project updates
Dated notes tied to actual revisions of the site, not a simulated activity feed.
Audio experiments published
Added five implemented audio-ML projects with local experiments and measurement limits.
Site revision 8d75d02
These entries reflect published changes to this website. The website repository is private; revision IDs are not public source links.
Discuss this project
Questions, ideas, minimal reproductions and corrections are welcome. Each project has its own public GitHub Discussion.
You can read without an account; posting requires GitHub sign-in. Keep private customer information, credentials and restricted material out of public threads.
Open this project's discussion