I was working on a project on music genre classification and decided to use an hmm to model my data. After extracting the mfccs' from multiple song clips I get multiple matrices of size 13 * x (depending on song length).
From what I understand hmm_train cannot be used for sequences of vectors and murphyk's toolbox might work. I tried modifying the demo file as follows to try a single song but I'm getting the error 'Attempted to access obsmat(:,61.6357); index must be a positive integer or logical..'
O = 5; Q = 10; v=wavread('We are the champions'); coeff=melfcc(v); data=coeff'; % initial guess of parameters prior1 = normalise(rand(Q,1)); transmat1 = mk_stochastic(rand(Q,Q)); obsmat1 = mk_stochastic(rand(Q,O)); % improve guess of parameters using EM [LL, prior2, transmat2, obsmat2] = dhmm_em(data, prior1, transmat1, obsmat1, 'max_iter', 5); LL
I haven't worked on this stuff before so I apologize in advance if my question comes across as really basic. It would be great if somebody could tell me where I'm going wrong. Also for multiple clips, should I simply append the matrices generated to the one I'm supplying above? Thanks.
Edit: It turns out that the above hmm can only be applied to discrete values which is possibly why I was getting errors. It seems I have to use another function for 'gaussian output' instead, mhmm_em. I'll post another question to figure out its working.