summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/speaker.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/speaker.py b/client/speaker.py
index f2d4ab7..e7dc075 100644
--- a/client/speaker.py
+++ b/client/speaker.py
@@ -22,8 +22,11 @@ class MacSpeaker:
def isAvailable(cls):
return os.system("which say") == 0
+ def shellquote(self, s):
+ return "'" + s.replace("'", "'\\''") + "'"
+
def say(self, phrase):
- os.system("say " + phrase)
+ os.system("say " + self.shellquote(phrase))
def playSound(self, filename):
os.system("afplay " + filename)