Skip to content

Commit

Permalink
"Fix time paramater of the SpeechSignal" from cmusphinx#59
Browse files Browse the repository at this point in the history
  • Loading branch information
SeH committed Aug 23, 2016
1 parent f343824 commit ff15f9d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public Data getData() throws DataProcessingException {

if (data instanceof DataEndSignal) {
if (inSpeech) {
outputQueue.add(new SpeechEndSignal());
outputQueue.add(new SpeechEndSignal(((DataEndSignal)data).getDuration()));
}
outputQueue.add(data);
break;
Expand Down Expand Up @@ -174,7 +174,7 @@ public Data getData() throws DataProcessingException {

if (!inSpeech && speechCount == startSpeechFrames) {
inSpeech = true;
outputQueue.add(new SpeechStartSignal(cdata.getCollectTime() - speechLeader - startSpeechFrames));
outputQueue.add(new SpeechStartSignal(cdata.getCollectTime() - speechLeader - startSpeechTime));
outputQueue.addAll(inputQueue.subList(
Math.max(0, inputQueue.size() - startSpeechFrames - speechLeaderFrames), inputQueue.size()));
inputQueue.clear();
Expand Down

0 comments on commit ff15f9d

Please sign in to comment.