Skip to content

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

@ffont

Description

@ffont

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions