Result result = recognizer.recognize();
if (result != null) {
String resultText = result.getBestFinalResultNoFiller();
setDescription("You said: " + resultText);
if (!resultText.trim().isEmpty()) {
SpeechEvent event = new SpeechEvent(this, resultText);
Freedomotic.sendEvent(event);
}
} else {
setDescription("I can't hear what you said");
}