Updated the comments and how rate is done
This commit is contained in:
13
main.py
13
main.py
@@ -6,6 +6,8 @@ import args # Handles command line arguments
|
||||
import maths
|
||||
import dictate
|
||||
|
||||
engine = pyttsx3.init()
|
||||
|
||||
config = {}
|
||||
with open('config.json', 'r') as file:
|
||||
config = json.load(file)
|
||||
@@ -15,13 +17,14 @@ config = args.handle_arguments(sys.argv, config)
|
||||
|
||||
dictation = ''
|
||||
|
||||
engine.setProperty('rate', config['wpm'])
|
||||
# TODO: match case
|
||||
match config['mode']:
|
||||
case 'word':
|
||||
dictate.words(config)
|
||||
case 'words':
|
||||
dictate.words(config, engine)
|
||||
case 'timed':
|
||||
dictate.timed(config)
|
||||
dictate.timed(config, engine)
|
||||
case 'quote':
|
||||
dictate.quote(config)
|
||||
dictate.quote(config, engine)
|
||||
case 'file':
|
||||
dictate.file(config)
|
||||
dictate.file(config, engine)
|
||||
|
||||
Reference in New Issue
Block a user