Skip to content

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

@skewballfox

Description

@skewballfox

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    easyopposite of hardhelp wantedExtra attention is neededpythonanything related to the python api or where python code is needed

    Projects

    Status

    πŸ†• New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions