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

Add helper method to load audio content in numpy array #25

Open
ffont opened this issue Aug 26, 2019 · 0 comments
Open

Add helper method to load audio content in numpy array #25

ffont opened this issue Aug 26, 2019 · 0 comments

Comments

@ffont
Copy link
Member

ffont commented Aug 26, 2019

The Freesound API is often used to download sounds to disk and then load them in numpy arrays (or other types of data structures). It would be useful to add a method to handle this process automatically. It could even be a parameter for the retrieve or retrieve_preview methods of Sound class which, when set, would directly return the audio contents loaded in a numpy array. Internally the method would download the file in a temporary location, load it in Python and delete the file in disk.

This will require to use 3rd party packages to load the audio file. We can make this optional and will only work if user has dependencies installed. Probably the best way to do it would be using essentia as it will be able to load both previews and original files in all formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant