bmcfee / muda

A library for augmenting annotated audio data
ISC License
230 stars 33 forks source link

Can I load a wav file without JAMS? #63

Closed cdyao closed 4 years ago

cdyao commented 6 years ago

Hi:

I would like to do data-augmentation for my bunch of wav files. Can I use MUDA without JAMS file? Thanks!

bmcfee commented 6 years ago

MUDA uses jams for the underlying data structure to store parameters, so no. But, you can always make an empty jams object at load time, run it through MUDA, and discard the jams at the end.

You probably should keep the output jams though, as it contains all the history of how the augmentation was performed.

bmcfee commented 6 years ago

Note to self: we should add an example of this to the documentation.

cdyao commented 6 years ago

Glad to hear that an empty JAMS is a solution. Expecting to see the example code since I still have no ideal how to do it. Thanks for the reply!

cdyao commented 6 years ago

It turns out this is so simple. (Sorry I'm a rookie in this)

import muda
import jams

j_orig = muda.load_jam_audio(jams.JAMS(), 'some.wav')