MCPcopy Create free account
hub / github.com/evilsocket/cake / test_hann_window

Function test_hann_window

cake-core/src/models/luxtts/mel.rs:157–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155
156 #[test]
157 fn test_hann_window() {
158 let w = hann_window(4);
159 assert_eq!(w.len(), 4);
160 assert!((w[0]).abs() < 1e-6); // Start at 0
161 // Periodic Hann(4) = [0, 0.5, 1.0, 0.5]
162 assert!((w[1] - 0.5).abs() < 0.01);
163 assert!((w[2] - 1.0).abs() < 0.01);
164 assert!((w[3] - 0.5).abs() < 0.01);
165 }
166
167 #[test]
168 fn test_mel_filterbank_shape() {

Callers

nothing calls this directly

Calls 1

hann_windowFunction · 0.85

Tested by

no test coverage detected