48 lines
1.5 KiB
Python
48 lines
1.5 KiB
Python
|
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')
|
||
|
# argParser.add_argument(
|
||
|
# '--voice-port',
|
||
|
# required=True,
|
||
|
# type=int,
|
||
|
# help='The port on which to listen for TCP connections (listens on 0.0.0.0) for audio receivers'
|
||
|
# )
|
||
|
# argParser.add_argument(
|
||
|
# '--event-address',
|
||
|
# type=str,
|
||
|
# default="127.0.0.1",
|
||
|
# help='The ip to which to set up the TCP connection for sending events. Can also be an existing unix file socket.'
|
||
|
# )
|
||
|
# argParser.add_argument(
|
||
|
# '--event-port',
|
||
|
# type=int,
|
||
|
# help='The port on which to set up the TCP connection for sending events. Ignored if --event-address points to a file socket'
|
||
|
# )
|
||
|
# argParser.add_argument(
|
||
|
# '--language-code',
|
||
|
# default="en-US",
|
||
|
# type=str,
|
||
|
# help='Language code for Speech to Text (BCP-47 language tag)'
|
||
|
# )
|
||
|
argParser.add_argument(
|
||
|
'--verbose',
|
||
|
'-v',
|
||
|
action="store_true",
|
||
|
)
|
||
|
|
||
|
args = argParser.parse_args()
|
||
|
|
||
|
coloredlogs.install(
|
||
|
level=logging.DEBUG if args.verbose else logging.INFO,
|
||
|
)
|
||
|
|
||
|
# server = VoiceServer(voice_port=4444, input_rate=44100)
|
||
|
hv = Hugvey()
|
||
|
hv.start()
|