[DialogProcessor] fix race condition (#2761)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>pull/2792/head
parent
c300410fd9
commit
417098e1ad
|
@ -244,7 +244,6 @@ public class DialogProcessor implements KSListener, STTListener {
|
|||
public synchronized void sttEventReceived(STTEvent sttEvent) {
|
||||
if (sttEvent instanceof SpeechRecognitionEvent) {
|
||||
if (!isSTTServerAborting) {
|
||||
abortSTT();
|
||||
SpeechRecognitionEvent sre = (SpeechRecognitionEvent) sttEvent;
|
||||
String question = sre.getTranscript();
|
||||
try {
|
||||
|
@ -256,6 +255,7 @@ public class DialogProcessor implements KSListener, STTListener {
|
|||
say(msg);
|
||||
}
|
||||
}
|
||||
abortSTT();
|
||||
}
|
||||
} else if (sttEvent instanceof RecognitionStartEvent) {
|
||||
toggleProcessing(true);
|
||||
|
|
Loading…
Reference in New Issue