melpe-rs 0.1.2

MELPe vocoder (STANAG 4591) in pure Rust — 600 bps voice codec, no_std compatible
Documentation
//! # melpe-rs
//!
//! Pure Rust implementation of the **MELPe** (Mixed Excitation Linear Prediction — enhanced)
//! vocoder, conforming to **STANAG 4591** / NATO narrowband voice coding at **600 bps**.
//!
//! ## Quick start
//!
//! ```rust
//! use melpe::encoder::Encoder;
//! use melpe::decoder::Decoder;
//! use melpe::core_types::{SUPERFRAME_SAMPLES, SUPERFRAME_BYTES_600};
//!
//! let mut enc = Encoder::new();
//! let mut dec = Decoder::new();
//!
//! let samples = [0.0f32; SUPERFRAME_SAMPLES];
//! let mut bitstream = [0u8; SUPERFRAME_BYTES_600];
//! enc.encode(&samples, &mut bitstream);
//!
//! let mut output = [0.0f32; SUPERFRAME_SAMPLES];
//! dec.decode(&bitstream, &mut output);
//! ```
//!
//! ## Feature flags
//!
//! - **`std`** (default) — native `f32` math, hardware-backed on x86_64
//! - **`embedded`** — `#![no_std]`, routes math through [`libm`](https://crates.io/crates/libm)

#![cfg_attr(feature = "embedded", no_std)]

/// Floating-point math shim — dispatches to `std` or `libm` based on feature flags.
pub mod math;
/// Constants, frame geometry, and superframe data structures.
pub mod core_types;
/// LPC analysis: autocorrelation, Levinson-Durbin, LPC↔LSF conversion, windowing.
pub mod lpc;
/// Pitch detection via normalized autocorrelation with parabolic interpolation.
pub mod pitch;
/// 5-band bandpass voicing analysis and mixed excitation generation.
pub mod voicing;
/// Scalar quantization of LSFs, pitch, gain, and voicing for 600 bps superframes.
pub mod quantize;
/// Bit-level packing and unpacking of 41-bit superframes into 6 bytes.
pub mod bitstream;
/// All-pole synthesis filter, de-emphasis, and frame-level synthesis processor.
pub mod synthesis;
/// Top-level encoder: 540 samples → 6 bytes.
pub mod encoder;
/// Top-level decoder: 6 bytes → 540 samples.
pub mod decoder;