Speech Recognition Engines

Flat
Reduce vector size in HTK
User: John Ford
Date: 1/11/2015 4:13 am
Views: 5334
Rating: 1

Hello all, I hope you can help me with this (if possible).

I have a large HMM file (~2.2G) trained on a large data set.

My feature vector size is 28. I'm adding the first derivative, so the mean vector size for each model in the HMM file is 56.

For some reason, I need to remove the last 8 coefficients from the feature vector, so it would be 20 instead of 28.

Is there any way I can remove these coefficients from the HMM file for each model without the need to retrain? (Can HHEd help ?)

Please suggest. Thanks.

--- (Edited on 1/11/2015 4:13 am [GMT-0600] by Visitor) ---

Re: Reduce vector size in HTK
User: TonyR
Date: 1/11/2015 10:59 am
Views: 142
Rating: 1

I've never reduced the stream width, but have often extended it.   Try SW 1 20.  From:

http://wwwlands2.let.kun.nl/members/software/HTKBook_2.0/node187.html#SECTION041612200000000000000

SW s n

Change the width of stream s of all currently loaded HMMs to n. Changing the width of stream involves changing the dimensions of all mean and variance vectors or covariance matrices. If n is greater than the current width of stream s, then mean vectors are extended with zeroes and variance vectors are extended with 1's. Covariance matrices are extended with zeroes everywhere except for the diagonal elements which are set to 1. This command preserves any tyings which may be in force.

-- 

Dr Tony Robinson
CTO Cantab Research Ltd

Cantab is hiring - see www.cantabResseach.com/opening

--- (Edited on 11-January-2015 4:59 pm [GMT+0000] by TonyR) ---

Re: Reduce vector size in HTK
User: John Ford
Date: 1/11/2015 4:20 pm
Views: 115
Rating: 2

Thank you for your great reply. Now if I specify "SW 1 20" it will leave the first 20 coefficients (as I wanted). However, it removes the other 20 coefficients (first derivatives). How can I recompute the first derivatives and add them?


Thank you!

--- (Edited on 1/11/2015 4:20 pm [GMT-0600] by Visitor) ---

Re: Reduce vector size in HTK
User: John Ford
Date: 1/11/2015 6:26 pm
Views: 66
Rating: 1

Nevermind. I figured out how to do this.

I need to decrese the vector size with SW and then increase to double size with SW also. And later, I use SK to add the derivatives.


Thanks.

--- (Edited on 1/11/2015 6:26 pm [GMT-0600] by Visitor) ---

Re: Reduce vector size in HTK
User: John Ford
Date: 1/11/2015 9:44 pm
Views: 47
Rating: 2

Got a problem here, "SK MFCC_D" is leaving the means all 0. Why?

--- (Edited on 1/11/2015 9:44 pm [GMT-0600] by Visitor) ---

Re: Reduce vector size in HTK
User: TonyR
Date: 1/12/2015 12:36 am
Views: 2146
Rating: 2

"How can I recompute the first derivatives and add them?"

You have to run HERest to add in derivative information which is not what you want to do.


Bite the bullet and either wrtite some perl/python to exit all the means and variences lines as you want them, or hack into the HTK code.   It won't be much code.

 

Tony

-- 

Dr Tony Robinson
CTO Cantab Research Ltd

--- (Edited on 12-January-2015 6:36 am [GMT+0000] by TonyR) ---

PreviousNext