rift-media
Part of the riftd project — serverless P2P voice + text chat over UDP.
What's in this crate?
rift-media handles everything audio:
- Audio Capture — Cross-platform microphone input via cpal
- Audio Playback — Cross-platform speaker output via cpal
- Opus Codec — High-quality, low-latency voice encoding
- VAD — Voice activity detection to reduce bandwidth
- Level Metering — Audio level detection for UI indicators
- Quality Presets — Low/medium/high bitrate configurations
Usage
use ;
let config = default;
// Encoding
let mut encoder = new?;
let encoded = encoder.encode_f32?;
// Decoding
let mut decoder = new?;
let decoded = decoder.decode_f32?;
// Capture from microphone
let capture = new?;
capture.start?;
Related Crates
| Crate | Description |
|---|---|
| rift-protocol | Voice frame message types |
| rift-mesh | Sends/receives voice over mesh |
| rift-sdk | High-level voice call API |
Citation
If you use riftd in academic work, please cite:
de Beer, R. (2026). Predictive Rendezvous: Time–Intent–Deterministic Peer Coordination Without Infrastructure. Zenodo. https://doi.org/10.5281/zenodo.18528430
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.