hugvey/hugvey_client.py

35 lines
934 B
Python
Raw Normal View History

2019-01-15 20:40:44 +00:00
from hugvey.client import Hugvey
import coloredlogs, logging
import argparse
if __name__ == '__main__':
argParser = argparse.ArgumentParser(description='Start up a Hugvey pillow. Mic stream becomes available on TCP Socket, and starts listening + emitting events')
2019-01-15 22:34:59 +00:00
argParser.add_argument(
'--config',
'-c',
required=True,
type=str,
help='The yaml config file to load'
)
2019-01-15 20:40:44 +00:00
argParser.add_argument(
'--verbose',
'-v',
action="store_true",
)
2019-03-07 20:34:50 +00:00
argParser.add_argument(
'--id',
type=int,
default=None,
help="Force the given id to be used. Must be integer"
)
2019-01-15 20:40:44 +00:00
args = argParser.parse_args()
coloredlogs.install(
level=logging.DEBUG if args.verbose else logging.INFO,
)
2019-03-07 20:34:50 +00:00
hv = Hugvey(args.id)
2019-01-15 22:34:59 +00:00
hv.loadConfig(args.config)
2019-01-15 20:40:44 +00:00
hv.start()