diff --git a/sphinx4-core/src/main/java/edu/cmu/sphinx/frontend/endpoint/SpeechMarker.java b/sphinx4-core/src/main/java/edu/cmu/sphinx/frontend/endpoint/SpeechMarker.java index 0b5c23250..75f2986d3 100644 --- a/sphinx4-core/src/main/java/edu/cmu/sphinx/frontend/endpoint/SpeechMarker.java +++ b/sphinx4-core/src/main/java/edu/cmu/sphinx/frontend/endpoint/SpeechMarker.java @@ -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; @@ -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();