Added support for different voices, renamed language and quote files with their 2 letter abreviations.
New arguments: -v, -c
This commit is contained in:
6
main.py
6
main.py
@@ -8,16 +8,14 @@ import dictate
|
||||
|
||||
engine = pyttsx3.init()
|
||||
|
||||
config = {}
|
||||
with open('config.json', 'r') as file:
|
||||
config = json.load(file)
|
||||
|
||||
# Handle the command line arguments
|
||||
config = args.handle_arguments(sys.argv, config)
|
||||
|
||||
dictation = ''
|
||||
config = args.handle_arguments(sys.argv, config, engine)
|
||||
|
||||
engine.setProperty('rate', config['wpm'])
|
||||
engine.setProperty('voice', config['voice'])
|
||||
# TODO: match case
|
||||
match config['mode']:
|
||||
case 'words':
|
||||
|
||||
Reference in New Issue
Block a user