A Rust library for decoding SILK audio files (.silk) to WAV bytes.
- Decode SILK V3 packets
- Export standard WAV data (
PCM 16-bit, mono) - Simple API:
silk_to_wav
Add this to your Cargo.toml:
[dependencies]
silk-decoder-rs = "0.1.0"use silk_decoder_rs::silk_to_wav;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let wav_bytes = silk_to_wav(24_000, "input.silk")?;
std::fs::write("output.wav", wav_bytes)?;
Ok(())
}silk_to_wav(sample_rate: u32, silk_path: &str) -> Result<Vec<u8>, SilkError>
sample_rate must be in [8000, 48000].
MIT. See LICENSE.
- Reference implementation inspiration: https://github.com/kn007/silk-v3-decoder.git