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
use ;
// Create prosody nodes from timing/energy/pitch data
let nodes: =
.map
.collect;
// Build a k-nearest-neighbor graph
let graph = build_knn.unwrap;
// Extract rhythmic layers via spectral decomposition
let extractor = new;
let layers = extractor.extract.unwrap;
// Segment into phrases using the Fiedler vector
let segmenter = new;
let phrases = segmenter.segment.unwrap;