From 417098e1addc069c43884a4a0fb8a00e30adcc01 Mon Sep 17 00:00:00 2001 From: GiviMAD Date: Sun, 20 Feb 2022 14:35:41 +0100 Subject: [PATCH] [DialogProcessor] fix race condition (#2761) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Álvarez Díez --- .../java/org/openhab/core/voice/internal/DialogProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java b/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java index 9870634ab6..869cc665d4 100644 --- a/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java +++ b/bundles/org.openhab.core.voice/src/main/java/org/openhab/core/voice/internal/DialogProcessor.java @@ -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);