From 5ccf25eb98f861168056298800c5eeca4c8bf4e3 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 9 Jun 2016 00:09:40 +0100 Subject: [PATCH] say.py allow passing args to espeak --- say.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/say.py b/say.py index 71ea266..110bfbd 100644 --- a/say.py +++ b/say.py @@ -17,7 +17,7 @@ def say(message): if platform == "darwin": os.system("say " + args + " '" + message + "' 2>/dev/null") elif platform == "linux" or platform == "linux2": - os.system("echo '" + message + "' | espeak 2>/dev/null") + os.system("echo '" + message + "' | espeak " + args + " 2>/dev/null") def prof_post_chat_message_display(jid, message): @@ -83,14 +83,15 @@ def prof_init(version, status, account_name, fulljid): synopsis = [ "/say on|off|active", "/say args ", + "/say clearargs", "/say test " ] description = "Read all messages out loud" args = [ [ "on|off", "Enable/disable say for all windows" ], [ "active", "Enable say for active window only" ], - [ "args ", "Arguments to pass to 'say' command on OSX" ], - [ "clearargs ", "Clear 'say' command arguments on OSX" ], + [ "args ", "Arguments to pass to command" ], + [ "clearargs ", "Clear command arguments" ], [ "test ", "Say message" ] ] examples = []