26 lines
488 B
Python
26 lines
488 B
Python
import pyttsx3
|
|
import sys
|
|
import json
|
|
|
|
import args # Handles command line arguments
|
|
import maths
|
|
import dictate
|
|
|
|
config = {}
|
|
with open('config.json', 'r') as file:
|
|
config = json.load(file)
|
|
|
|
# Handle the command line arguments
|
|
config = args.handle_arguments(sys.argv, config)
|
|
print(config)
|
|
|
|
dictation = ''
|
|
|
|
# TODO: match case
|
|
if config['mode'] == 'words':
|
|
dictate.words(config)
|
|
if config['mode'] == 'timed':
|
|
dictate.timed(config)
|
|
if config['mode'] == 'quote':
|
|
dictate.quote(config)
|