18 from alsaaudio
import Mixer
19 from threading
import Thread, Timer
26 init_display_manager_bus_connection
34 Serves as a communication interface between a simple text frontend and 35 Mycroft Core. This is used for Picroft or other headless systems, 36 and/or for users of the CLI. 39 _last_internet_notification = 0
64 if time.time() - Enclosure._last_internet_notification < 30:
68 Enclosure._last_internet_notification = time.time()
73 self.bus.emit(
Message(
"speak", {
74 'utterance':
"This device is not connected to the Internet. " 75 "Either plug in a network cable or set up your " 79 self.bus.emit(
Message(
'system.wifi.setup', {
'lang': self.
lang}))
82 self.bus.emit(
Message(
"speak", {
'utterance': text}))
86 Handler for 'mycroft.paired', unmutes the mic after the pairing is 89 self.bus.emit(
Message(
"mycroft.mic.unmute"))
93 LOG.info(
"Checking internet connection")
97 self.
speak(
"This unit is not connected to the Internet. " 98 "Either plug in a network cable or setup your " 108 self.bus.emit(
Message(
"mycroft.mic.mute"))
118 data = {
'allow_timeout':
False,
'lang': self.
lang}
119 self.bus.emit(
Message(
'system.wifi.setup', data))
def wait_while_speaking()
def _handle_pairing_complete(self, Message)
def init_display_manager_bus_connection()
def on_no_internet(self, event=None)
def get(phrase, lang=None, context=None)