audio-codec
A collection of VoIP audio codecs implemented in or wrapped for Rust. This crate provides a unified interface for encoding and decoding various audio formats commonly used in SIP, VoIP, and WebRTC applications.
Supported Codecs
| Codec | Implementation | Feature |
|---|---|---|
| G.711 (PCMA/PCMU) | Pure Rust | Built-in |
| G.722 | Pure Rust | Built-in |
| G.729 | Wrapper (g729-sys) |
Built-in |
| Opus | Wrapper (opusic-sys) |
opus (default) |
| Telephone Event | RFC 4733 | Built-in |
Features
- Unified API: Simple
EncoderandDecodertraits for all codecs. - Resampler: Built-in audio resampling utility.
- Lightweight: Minimal dependencies for core codecs.
Usage
Add this to your Cargo.toml:
[]
= "0.3"
Example: Decoding PCMA
use ;
Example: Encoding G.722
use G722Encoder;
use Encoder;
License
This project is licensed under the MIT License.