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

Function test_stft_shape

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

Source from the content-addressed store, hash-verified

178
179 #[test]
180 fn test_stft_shape() {
181 // 1 second of silence at 24kHz
182 let samples = vec![0.0f32; 24000];
183 let stft = compute_stft(&samples, 1024, 256);
184 let n_freq = 513;
185 assert_eq!(stft.len() % n_freq, 0);
186 let n_frames = stft.len() / n_freq;
187 // Expected: (24000 - 1024) / 256 + 1 = 90
188 assert!(n_frames > 0);
189 }
190
191 #[test]
192 fn test_mel_spectrogram_shape() {

Callers

nothing calls this directly

Calls 1

compute_stftFunction · 0.85

Tested by

no test coverage detected