sphinx4 icon indicating copy to clipboard operation
sphinx4 copied to clipboard

fix time parameter of Speech Signals

Open d4ksn opened this issue 8 years ago • 1 comments

Hello, I found the time statistics of the SpeedTracker is sometimes incorrect, with "This Time Audio: XX.Xs" being a very big number (actually it's a timestamp counting from 1970-01-01). After tracing the code, I have found some issues regarding the time parameter of SpeechStartSignal/SpeechEndSignal, and fixed it by myself.

  1. I think SpeechEndSignal should be constructed with a time parameter relative to the audio time, just like in line 184 in this file. Otherwise, the time will be set to a system timestamp, which will cause the above issue.
  2. In the SpeechStartSignal constructor, the parameter is meant to be in millisecond (just like "cdata.getCollectTime()" and "speechLeader"). However, "startSpeechFrames" is counted in frame (which is "startSpeechTime"/10), so I have also changed this.

just some of my suggestions, I hope you would consider it, Thanks!

d4ksn avatar Jul 27 '16 11:07 d4ksn

Thanks for the pull request. Overall, I'm not quite happy with the current design of the frontend, its so painful to track all those signals. We will probably refactor it altogether.

nshmyrev avatar Aug 01 '16 07:08 nshmyrev