diff --git a/speech.py b/speech.py index c288ee8..700eee9 100644 --- a/speech.py +++ b/speech.py @@ -66,9 +66,9 @@ def processUserCommand( command, arguments, connection, view ): elif (args == 'voices'): voice_list = ', '.join(voices()) message('Voices: ' + voice_list, 'voiceList', None) - elif (args.startswith('voice')): - requested_voice = args.lstrip('voice ') - if setvoice(requested_voice): + elif (args.startswith('voice ')): + requested_voice = args[6:].lstrip() + if setvoice(requested_voice.capitalize()): message('Set voice to ' + requested_voice, 'voiceSet', None) else: message('%s is an invalid voice' % requested_voice, 'voiceSet', @@ -79,8 +79,8 @@ def processUserCommand( command, arguments, connection, view ): '----', '/speech on - Enable speech', '/speech off - Disable speech', - '/speech voices - List available voices', - '/speech voice - Set speaking voice', + '/speech voices - List available voices.', + '/speech voice VOICE - Set speaking voice', '/speech help - Display this help' ] for line in help_text: @@ -99,6 +99,7 @@ def processIncomingMessage( message, view ): if speaking and source.startswith('Chat Room'): say(msg) + # Unused functions below: # called on unload and relead