I have an audio file say myfile.wav
I trained a neural network based on fft features, and it is giving pretty good results for detecting particular classes of sounds.
I want to expand above experiment to include more sophisthicated features like MFCC along with simpler features like RMSEnergy and so on.
I can compute mfcc as follows:
import librosa y, sr = librosa.load('myfile.wav') mfcc=librosa.feature.mfcc(y=y, sr=sr) print mfcc.shape (20,5911)
Similarly I can compute rmse as follows:
myrmse = librosa.feature.mfcc(y=y) print myrmse.shape (1,5911)
Q1. Is it valid if I transpose mfcc and the myrsme and combine the two using numpy.hstack ?
t = mfcc.transpose() t2 = myrmse.transpose()
So that I now have two arrays : one of size (5911,20) and another of size (5911,1) and
t3 = numpy.hstack((t,t2))
If above operation is valid, how do I append more features to t3 , Ex: SNR , FFT and other audio features.
I'm particularly interested in combining fft with mfcc.
END GOAL My plan is to have feature data like this :
feat_1 feat_2 ...feat_20 rmse feat_21 ...feat_n label val val val val val val x val val val val val val x val val val val val val y val val val
feat_1 .. feat_20 are mfcc related features.
rmse is rms energy from librosa
feat_21 could be some other thing like fft or SNR.
I want to train a ANN and see which combination of features work best for detecting a particular class of sound. And conclude if mfcc's / fft's alone is sufficient for achieving this.
If this is not the right forum kindly direct me to the correct place.