You’re welcome !
Ok then I think the code i wrote above should fit your need just fine. Did you manage to make it work ?
If I may suggest you an other approach, you can try to transform your 1D audio signals into 2D signals (for instance by computing their spectrograms) and then apply a convolutional neural network onto those 2D signals. This allows you to use powerful CNN architectures, which, from my experience, lead to better results for audio classification.