From 2c55f4da462383ee6c7b89ea44e5c40cd5badf0c Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 23 Jul 2014 21:21:17 -0700 Subject: Google STT works on OS X --- client/modules/Life.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 client/modules/Life.py (limited to 'client/modules/Life.py') diff --git a/client/modules/Life.py b/client/modules/Life.py deleted file mode 100644 index 2c79ee1..0000000 --- a/client/modules/Life.py +++ /dev/null @@ -1,32 +0,0 @@ -import random -import re - -WORDS = ["MEANING", "OF", "LIFE"] - - -def handle(text, mic, profile): - """ - Responds to user-input, typically speech text, by relaying the - meaning of life. - - Arguments: - text -- user-input, typically transcribed speech - mic -- used to interact with the user (for both input and output) - profile -- contains information related to the user (e.g., phone number) - """ - messages = ["It's 42, you idiot.", - "It's 42. How many times do I have to tell you?"] - - message = random.choice(messages) - - mic.say(message) - - -def isValid(text): - """ - Returns True if the input is related to the meaning of life. - - Arguments: - text -- user-input, typically transcribed speech - """ - return bool(re.search(r'\bmeaning of life\b', text, re.IGNORECASE)) -- cgit v1.3.1