wavey-ai / mel-spec

Rust library for whisper.cpp compatible Mel spectrograms
MIT License
54 stars 14 forks source link

mel_spec::mel returns NaNs #7

Closed wfjsw closed 5 months ago

wfjsw commented 5 months ago
#[test]
fn test_mel() {
    let mel = mel(16000.0f64, 1024, 128, true, true);

    println!("{:?}", mel);
}
---- tests::pitch::tests::test_mel stdout ----
[[NaN, NaN, NaN, NaN, NaN, ..., NaN, NaN, NaN, NaN, NaN],
 [NaN, NaN, NaN, NaN, NaN, ..., NaN, NaN, NaN, NaN, NaN],
 [NaN, NaN, NaN, NaN, NaN, ..., NaN, NaN, NaN, NaN, NaN],
 [NaN, NaN, NaN, NaN, NaN, ..., NaN, NaN, NaN, NaN, NaN],
 [NaN, NaN, NaN, NaN, NaN, ..., NaN, NaN, NaN, NaN, NaN],
 ...,
 [NaN, NaN, NaN, NaN, NaN, ..., NaN, NaN, NaN, NaN, NaN],
 [NaN, NaN, NaN, NaN, NaN, ..., NaN, NaN, NaN, NaN, NaN],
 [NaN, NaN, NaN, NaN, NaN, ..., NaN, NaN, NaN, NaN, NaN],
 [NaN, NaN, NaN, NaN, NaN, ..., NaN, NaN, NaN, NaN, NaN],
 [NaN, NaN, NaN, NaN, NaN, ..., NaN, NaN, NaN, NaN, NaN]], shape=[128, 513], strides=[513, 1], layout=Cc (0x5), const ndim=2