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
//! # spectral-prosody
//!
//! Spectral graph methods for rhythmic prosody analysis.
//!
//! This crate maps speech/music prosody to a graph where nodes represent beats or syllables
//! and edges represent temporal proximity. The graph Laplacian's spectrum reveals rhythmic
//! patterns: low eigenvalues correspond to macro rhythm (large-scale phrasing), while high
//! eigenvalues correspond to micro rhythm (fine-grained beat structure). Spectral clustering
//! segments prosody into phrases.
//!
//! ## Quick Start
//!
//! ```rust
//! use spectral_prosody::{ProsodyNode, ProsodyGraph, RhythmExtractor, PhraseSegmenter};
//!
//! // Create prosody nodes from timing/energy/pitch data
//! let nodes: Vec<ProsodyNode> = (0..8)
//! .map(|i| ProsodyNode::new(i as f64 * 0.5, 1.0, 220.0 + i as f64 * 5.0, 0.25, 3000.0))
//! .collect();
//!
//! // Build a k-nearest-neighbor graph
//! let graph = ProsodyGraph::build_knn(nodes, 3, 1.0).unwrap();
//!
//! // Extract rhythmic layers via spectral decomposition
//! let extractor = RhythmExtractor::new(5);
//! let layers = extractor.extract(&graph).unwrap();
//!
//! // Segment into phrases using the Fiedler vector
//! let segmenter = PhraseSegmenter::new(4);
//! let phrases = segmenter.segment(&graph).unwrap();
//! ```
pub use ProsodyError;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;