Skip to content

Commit ff15f9d

Browse files
author
SeH
committed
"Fix time paramater of the SpeechSignal" from cmusphinx#59
1 parent f343824 commit ff15f9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sphinx4-core/src/main/java/edu/cmu/sphinx/frontend/endpoint/SpeechMarker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public Data getData() throws DataProcessingException {
146146

147147
if (data instanceof DataEndSignal) {
148148
if (inSpeech) {
149-
outputQueue.add(new SpeechEndSignal());
149+
outputQueue.add(new SpeechEndSignal(((DataEndSignal)data).getDuration()));
150150
}
151151
outputQueue.add(data);
152152
break;
@@ -174,7 +174,7 @@ public Data getData() throws DataProcessingException {
174174

175175
if (!inSpeech && speechCount == startSpeechFrames) {
176176
inSpeech = true;
177-
outputQueue.add(new SpeechStartSignal(cdata.getCollectTime() - speechLeader - startSpeechFrames));
177+
outputQueue.add(new SpeechStartSignal(cdata.getCollectTime() - speechLeader - startSpeechTime));
178178
outputQueue.addAll(inputQueue.subList(
179179
Math.max(0, inputQueue.size() - startSpeechFrames - speechLeaderFrames), inputQueue.size()));
180180
inputQueue.clear();

0 commit comments

Comments
 (0)