Skip to main content

Module silk

Module silk 

Source
Expand description

Bounded independent SILK SDK wrapper. Public source/license pins are under vendor/silk; no WeChat codec library is linked or loaded.

Constants§

BIT_RATE
Target bit rate of the single bundled encoder profile (silk_bridge.c). SILK’s wideband range tops out here; the previous 16 kbit/s profile was audibly destructive for anything richer than speech, and the rate control is soft, so the actual stream lands well under this ceiling.
FRAME_MS
Duration of one encoded SILK packet in the bundled profile.
MAX_NOTE_BYTES
Encoded-size bound for one maximum-length note from the bundled profile: the 10-byte header plus, per 20 ms packet, a 2-byte length prefix and the 40 kbit/s payload budget (100 bytes) with 1.5x headroom. SILK rate control is soft, so single packets may exceed the budget; the observed 60-second worst case (full-scale white noise) averages about 2.2 KB/s, or 131 KB.
MAX_NOTE_MS
Longest single voice note: the official 60-second voice-message limit.
MAX_SAMPLES
MAX_STREAM_BYTES
Largest stream accepted by framing validation and decoding.
SAMPLE_RATE

Functions§

decode
encode
validate_framing
wav