matlabhidden-markov-modelshtk

HTK - mismatch of time stamp in MLF file


I am recently writing a sound detection project using HTK (a HMM tool kit). After testing I get the following result file:

#!MLF!#
"../data/test/keyboard_04.rec"
0 47000000 keyboard -83909.929688
.

In the official doc, it says the time stamp has a unit of 100ns, so by this result, it says from 0s-4.7s, there is a sound of "keyboard". But the weird thing is that the testing sound file only has 1.9s, here is the detailed information:

>>  audioinfo('keyboard_04.wav')
ans = 
         Filename: [1x50 char]
CompressionMethod: 'Uncompressed'
      NumChannels: 2
       SampleRate: 44100
     TotalSamples: 83712
         Duration: 1.8982
            Title: []
          Comment: []
           Artist: []
    BitsPerSample: 24

Moreover, when I am running HVite, there is a warning:

WARNING [-7032]  OWarn: change HMM Set vecSize

Maybe this relates to my problem?

Does anybody know why the time stamp is so large? Thanks anyway!


Solution

  • Ah, I figured out why there has such a time difference. The time stamp in HTK result is the "total frame time", even there is overlapping. Say, in my example, the window size is 25ms, window step is 10ms, and 188 frames in total.

    For HTK, 188*0.025=4.7(s). But this time result does not take overlap into consideration.

    Consider overlap, i.e. 0.025+187*0.01=1.895, and this is the audio time.

    What a weird seting in HTK, haha.