1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Audio processing module for xybrid-core (v0.0.7).
//!
//! This module provides type-safe audio handling with format detection,
//! conversion utilities, and integration with the Envelope IR.
//!
//! ## Features
//!
//! - `AudioFormat` enum for type-safe format specification
//! - `AudioEnvelope` struct with rich audio metadata
//! - WAV file parsing and validation
//! - Audio format conversion (PCM normalization, resampling)
//! - Integration with pipeline Envelope system
//!
//! ## Example
//!
//! ```no_run
//! use xybrid_core::audio::{AudioEnvelope, AudioFormat};
//!
//! // Create from WAV bytes
//! let wav_bytes = std::fs::read("audio.wav").unwrap();
//! let audio = AudioEnvelope::from_wav(&wav_bytes).unwrap();
//! println!("Duration: {}ms, Sample Rate: {}Hz", audio.duration_ms(), audio.sample_rate);
//!
//! // Convert to pipeline Envelope
//! let envelope = audio.to_envelope();
//! ```
//!
//! ## Implementation Notes
//!
//! The WAV parser is a lightweight custom implementation to minimize dependencies.
//! For broader format support (24-bit PCM, extensible format, metadata chunks),
//! consider the [`hound`](https://crates.io/crates/hound) crate as a future enhancement.
pub use ;
pub use ;
pub use ;
// New unified mel spectrogram API
pub use ;
// Legacy re-exports for backwards compatibility
pub use ;
// Voice Activity Detection
pub use ;