Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create npy files for testing the input and output of cacheable functions #25

Open
skewballfox opened this issue Jul 1, 2023 · 0 comments
Labels
easy opposite of hard help wanted Extra attention is needed python anything related to the python api or where python code is needed

Comments

@skewballfox
Copy link
Collaborator

skewballfox commented Jul 1, 2023

by cacheable I mean the input/output of functions which don't change based off the signal, only it's attributes (the long series of function args such as fft_size and window_stride).

since these functions don't change based off the signal, they are much easier to test.

the process would be as follows:

  1. find the equivalent python numpy function, save the output as an npy file.
  2. label it so that it is easy to determine what input it was supplied, and in some format that this can be determined in a loop, or just save the input for specific files separately in a file that can be deserialized.
  3. use this crate to read the result into an array rust side. call the rust function and make sure the absolute difference between the deserialized python output and generated rust output is under some acceptable error bounds

it might actually be worth creating a new repository for the python code for doing this as this could potentially be useful to other ndarray-based crates(for example, I mentioned this idea here)

the functions we would want to test are:

  1. the function generating filterbanks, against librosa's filter.mel function.
  2. the window generator currently used in analysis frames (more on this later), definitely after figuring out what windowing function that is, and once again comparing it to librosa's for the sake of sanity.
@skewballfox skewballfox added python anything related to the python api or where python code is needed help wanted Extra attention is needed easy opposite of hard labels Jul 1, 2023
@secretsauceai secretsauceai moved this to 🆕 New in MFCC-rust Jul 8, 2023
@secretsauceai secretsauceai added this to the Deliver MFCC rust MVP milestone Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy opposite of hard help wanted Extra attention is needed python anything related to the python api or where python code is needed
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants