sphinx4
sphinx4 copied to clipboard
fix time parameter of Speech Signals
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.
- 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.
- 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!
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.