print("*********************************************************") print("* JARVIS - Just A Rather Very Intelligent System *") print("* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *") print("*********************************************************") print("*And,Ang,Arc,Dyl,Eric,Ikh,Kez,Mik,Mir,Reg,Sef,Stel,Vero *") print("*********************************************************") print() logging.basicConfig() logger = logging.getLogger() logger.getChild("client.stt").setLevel(logging.INFO) if args.debug: logger.setLevel(logging.DEBUG) if not args.no_network_check and not diagnose.check_network_connection(): logger.warning("Network not connected. This may prevent Jasper from " + "running properly.") if args.diagnose: failed_checks = diagnose.run() sys.exit(0 if not failed_checks else 1) try: app = Jasper() except Exception: logger.error("Error occured!", exc_info=True) sys.exit(1) app.run()
if __name__ == "__main__": print("*******************************************************") print("* JASPER - THE TALKING COMPUTER *") print("* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *") print("*******************************************************") logging.basicConfig() logger = logging.getLogger() logger.getChild("client.stt").setLevel(logging.INFO) if args.debug: logger.setLevel(logging.DEBUG) if not args.no_network_check and not diagnose.check_network_connection(): logger.warning("Network not connected. This may prevent Jasper from " + "running properly.") if args.diagnose: failed_checks = diagnose.run() sys.exit(0 if not failed_checks else 1) try: app = Jasper() except Exception: logger.error("Error occured!", exc_info=True) sys.exit(1) app.run()
#!/usr/bin/env python2 # -*- coding: utf-8-*- from __future__ import print_function import os import sys import logging import yaml import argparse import requests import socket from client import tts from client import stt from client import dingdangpath from client import diagnose from client.conversation import Conversation # Add dingdangpath.LIB_PATH to sys.path sys.path.append(dingdangpath.LIB_PATH) parser = argparse.ArgumentParser(description='Dingdang Voice Control Center') parser.add_argument('--local', action='store_true', help='Use text input instead of a real microphone') parser.add_argument('--no-network-check', action='store_true', help='Disable the network connection check') parser.add_argument('--diagnose', action='store_true', help='Run diagnose and exit') parser.add_argument('--debug', action='store_true', help='Show debug messages') parser.add_argument('--info', action='store_true', help='Show info messages') parser.add_argument('--verbose',