src/Assistant.py
def run_assistant():
    """
    Listen for command;
    Check if wake trigger was detected;

    If so, perform action in command;
    If not, log it and perform action in command anyway.

    :return: None
    """
    command = listen_for_commands().lower()

    """
    Assistant checks the command to see if it has the wake word in it.
    """
    wake_word_detected: bool = check_for_wake_word(command)

    """
    By default, Assistant will check if the wake_word is detected and log the outcome.
    This process happens inside the check_for_wake_word function above.
    """
    if wake_word_detected:
        command_without_wake_word = cut_wake_word_from_command(command)
        perform_action(command_without_wake_word)
    else:
        if ASSISTANT_SETTINGS.get('Require Wake Word', False):
            logging.error(f'Wake Word required by settings; action {command} will not be performed.')
        else:
            """
            Here, the wake word is not required, so it will proceed to perform the action.
            This can be modified in the Settings file.
            """
            logging.info(f'Wake Word not required by settings; continuing to perform action')
            perform_action(command)

    Listen for command;
    Check if wake trigger was detected;

    If so, perform action in command;
    If not, log it and perform action in command anyway.

    :return: None
    
Listen for command;
Check if wake trigger was detected.

If so, perform action in command;
If not, log it and perform action in command anyway.
Listen for command ; Check if wake trigger was detected . If so perform action in command ; If not log it and perform action in command anyway .
def run_assistant():
    command = listen_for_commands().lower()
    wake_word_detected: bool = check_for_wake_word(command)
    if wake_word_detected:
        command_without_wake_word = cut_wake_word_from_command(command)
        perform_action(command_without_wake_word)
    else:
        if ASSISTANT_SETTINGS.get('Require Wake Word', False):
            logging.error(f'Wake Word required by settings; action {command} will not be performed.')
        else:
            logging.info(f'Wake Word not required by settings; continuing to perform action')
            perform_action(command)
def run_assistant ( ) : command = listen_for_commands ( ) . lower ( ) """
    Assistant checks the command to see if it has the wake word in it.
    """ wake_word_detected : bool = check_for_wake_word ( command ) """
    By default, Assistant will check if the wake_word is detected and log the outcome.
    This process happens inside the check_for_wake_word function above.
    """ if wake_word_detected : command_without_wake_word = cut_wake_word_from_command ( command ) perform_action ( command_without_wake_word ) else : if ASSISTANT_SETTINGS . get ( 'Require Wake Word' , False ) : logging . error ( f'Wake Word required by settings; action {command} will not be performed.' ) else : """
            Here, the wake word is not required, so it will proceed to perform the action.
            This can be modified in the Settings file.
            """ logging . info ( f'Wake Word not required by settings; continuing to perform action' ) perform_action ( command )
Listen for command;
Check if wake trigger was detected;
Listen for command ; Check if wake trigger was detected ;
"""
    Listen for command;
    Check if wake trigger was detected;

    If so, perform action in command;
    If not, log it and perform action in command anyway.

    :return: None
    """ """
    Assistant checks the command to see if it has the wake word in it.
    """ """
    By default, Assistant will check if the wake_word is detected and log the outcome.
    This process happens inside the check_for_wake_word function above.
    """ """
            Here, the wake word is not required, so it will proceed to perform the action.
            This can be modified in the Settings file.
            """
None