Skip to content

Commit

Permalink
fix /speech voice to actually work
Browse files Browse the repository at this point in the history
  • Loading branch information
dmd committed Apr 9, 2012
1 parent 6b51795 commit b83956a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ 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 ')
elif (args.startswith('voice ')):
requested_voice = args[6:].lstrip()
if setvoice(requested_voice):
message('Set voice to ' + requested_voice, 'voiceSet', None)
else:
Expand All @@ -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 <voice> - Set speaking voice',
'/speech voices - List available voices. Note these are case-sensitive.',
'/speech voice VOICE - Set speaking voice',
'/speech help - Display this help'
]
for line in help_text:
Expand All @@ -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
Expand Down

0 comments on commit b83956a

Please sign in to comment.