Пример #1
0
def testConnection():
    if Diagnostics.check_network_connection():
        print "CONNECTED TO INTERNET"
    else:
        print "COULD NOT CONNECT TO NETWORK"
        speaker.say(
            "Warning: I was unable to connect to a network. Parts of the system may not work correctly, depending on your setup.")
Пример #2
0
def testConnection():
    if Diagnostics.check_network_connection():
        print "CONNECTED TO INTERNET"
    else:
        print "COULD NOT CONNECT TO NETWORK"
        speaker.say(
            "Warning: I was unable to connect to a network. Parts of the system may not work correctly, depending on your setup."
        )
Пример #3
0
        conversation.handleForever()

if __name__ == "__main__":

    print "==========================================================="
    print " JASPER The Talking Computer                               "
    print " Copyright 2013 Shubhro Saha & Charlie Marsh               "
    print "==========================================================="

    logging.basicConfig()
    logger = logging.getLogger()
    
    if args.debug:
        logger.setLevel(logging.DEBUG)

    if not args.no_network_check and not Diagnostics.check_network_connection():
        logger.warning("Network not connected. This may prevent Jasper from running properly.")

    try:
        app = Jasper()
    except IOError:
        logger.exception("Can't read profile file.")
        sys.exit(1)
    except OSError:
        logger.exception("Language model or associated files missing.")
        sys.exit(1)
    except Exception():
        logger.exception("Unknown error occured")
        sys.exit(1)
    
    app.run()
Пример #4
0
        else:
            salutation = "How can I be of service?"
        self.mic.say(salutation)

        conversation = Conversation("JASPER", self.mic, self.config)
        conversation.handleForever()

if __name__ == "__main__":

    print "==========================================================="
    print " JASPER The Talking Computer                               "
    print " Copyright 2013 Shubhro Saha & Charlie Marsh               "
    print "==========================================================="

    logging.basicConfig()
    logger = logging.getLogger()
    
    if args.debug:
        logger.setLevel(logging.DEBUG)

    if not args.no_network_check and not Diagnostics.check_network_connection():
        logger.warning("Network not connected. This may prevent Jasper from running properly.")

    try:
        app = Jasper()
    except Exception:
        logger.exception("Error occured!", exc_info=True)
        sys.exit(1)
    
    app.run()