# silk-decoder-rs

A Rust library for decoding SILK audio files (`.silk`) to WAV bytes.

## Features

- Decode SILK V3 packets
- Export standard WAV data (`PCM 16-bit, mono`)
- Simple API: `silk_to_wav`

## Installation

Add this to your `Cargo.toml`:

```toml
[dependencies]
silk-decoder-rs = "0.1.0"
```

## Usage

```rust
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(())
}
```

## API

- `silk_to_wav(sample_rate: u32, silk_path: &str) -> Result<Vec<u8>, SilkError>`

`sample_rate` must be in `[8000, 48000]`.

## License

MIT. See [LICENSE](LICENSE).

## Acknowledgements

- Reference implementation inspiration: https://github.com/kn007/silk-v3-decoder.git
