wavey-ai / mel-spec Goto Github PK
View Code? Open in Web Editor NEWRust library for whisper.cpp compatible Mel spectrograms
License: MIT License
Rust library for whisper.cpp compatible Mel spectrograms
License: MIT License
So I was looking at using this as a library but none of the functionality seems publicly exposed? The readme looks quite impressive compared to the API functions docs.rs shows for the crate https://docs.rs/mel_spec/latest/mel_spec/index.html
Hi, I'm not really familiar with rust.
When running the browser example I got this error once transcription starts.
Looking in mel_spec_pipeline.js I find this.
I on rustc version 1.78.0, cargo 1.78.0. MacBook M1 Pro.
When building I had some warnings but nothing dramatic.
Not sure where to start.
Am I doing something wrong? Any help is welcomed. :)
I am trying to use the library to convert 4 second chunks of pcm data (at 16kHz) to mel spectrograms.
The library has some really nice tools for streaming data, what would you recommend when I have the exact number of samples in a Vec?
More simply I am looking for something that looks like this:
let pcm = vec![1.0; 4 * 16000];
let mel = pcm_to_mel(pcm, n_mel, fft_size, hop_size);
I am reasonably new to audio/rust in general and have been struggling to find a library with this functionality.
Everything seems to be fancier/more complex than I need.
Thanks,
Sefton
Awesome project.
If I was able to generate data from librosa's python functions(input and output npy files) to compare against, would you be interested in including those as a test case?
I started working on a tool for generating files for this for the library I've been working on after realizing none of the existing python functions for computing an MFCC had anywhere near the same results, and models may be somewhat overfit to the preprocessing step. but I'm less of a mathematician and more of a code monkey, so I'm just guessing.
Also interested in contributors?
#[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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.