🌿 silk-decode v1.0.0 · MIT

Decode Tencent SILK voice files (WeChat voice messages) to real WAV — handles the 0x02 prefix, no ffmpeg needed.

Why this exists

Two pitfalls bite everyone processing WeChat voice payloads:

silk-decode fixes both: it strips the prefix transparently and wraps the PCM into a proper WAV container using only the Python standard library.

Install (pip, v1.0+)

pip install "silk-decode[audio] @ git+https://mandrilly.com/git/silk-decode.git"

Library core is dependency-free; decoding requires the audio extra (pilk ≥ 0.2).

Quick start

silk-decode voice.silk                          # → voice.wav
silk-decode voice.silk voice.wav --rate 24000
silk-decode voice.silk --json                   # machine-readable summary

Honest exit codes: 0 success · 1 invalid input · 2 unexpected decoder failure.

Source

git clone https://mandrilly.com/git/silk-decode.git

Requires Python 3.9+. Test fixtures include both clean and Tencent-prefixed payloads. The 0x02 fix mirrors a production recipe validated by lab roundtrip (RMS preserved, delay-compensated correlation 0.97).