"Voice Icon" import time from daemon import DaemonPlugin class VoiceIcon(DaemonPlugin): "Forwards Messages from message bus to OSD Frontend" def initialize(self): "Initialize plugin" self.messagebus_client.on("recognizer_loop:wakeword", self.on_wakeword) self.messagebus_client.on("recognizer_loop:record_end", self.on_record_end) self.messagebus_client.on("recognizer_loop:utterance", self.on_utterance) def check(self, data): pass def on_wakeword(self, message): self.emit("voice:wakeword", {}) def on_record_end(self, message): self.emit("voice:record_end", {}) def on_utterance(self, message): self.emit("voice:utterance", {"text": message.data["utterances"][0]})