Beispiel #1
0
def stop_speaking():
    """Stop mycroft speech.

    TODO: Skills should only be able to stop speech they've initiated
    """
    if is_speaking():
        from mycroft.messagebus.send import send
        send('mycroft.audio.speech.stop')

        # Block until stopped
        while check_for_signal("isSpeaking", -1):
            time.sleep(0.25)
Beispiel #2
0
def stop_speaking():
    # TODO: Less hacky approach to this once Audio Manager is implemented
    # Skills should only be able to stop speech they've initiated
    from mycroft.messagebus.send import send
    create_signal('stoppingTTS')
    send('mycroft.audio.speech.stop')

    # Block until stopped
    while check_for_signal("isSpeaking", -1):
        time.sleep(0.25)

    # This consumes the signal
    check_for_signal('stoppingTTS')
Beispiel #3
0
def send_communication_to_messagebus(msg_type, msg):
    send("skill.communications.{}.new".format(msg_type),
         {"message": "{}".format(str(msg))})
Beispiel #4
0
def send_communication_to_messagebus(msg_type, msg: dict):
    send("skill.communications.{}".format(msg_type), msg)