From ff15f9d03cd06f18726c0d11d70e94fa68db4ec0 Mon Sep 17 00:00:00 2001 From: SeH Date: Mon, 22 Aug 2016 21:23:06 -0400 Subject: [PATCH] "Fix time paramater of the SpeechSignal" from https://github.com/cmusphinx/sphinx4/pull/59 --- .../java/edu/cmu/sphinx/frontend/endpoint/SpeechMarker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 014f9686b..6f378532e 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();