diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-07-23 21:21:17 -0700 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-07-23 21:21:17 -0700 |
| commit | 2c55f4da462383ee6c7b89ea44e5c40cd5badf0c (patch) | |
| tree | 078672f2b221cfb7d0aa765f438002a277914c9f /client/modules/Life.py | |
| parent | 8a5e5ed385a5c467260c2f1b20816a66cebfc1c6 (diff) | |
| download | jasper-client-2c55f4da462383ee6c7b89ea44e5c40cd5badf0c.tar.gz jasper-client-2c55f4da462383ee6c7b89ea44e5c40cd5badf0c.zip | |
Google STT works on OS X
Diffstat (limited to 'client/modules/Life.py')
| -rw-r--r-- | client/modules/Life.py | 32 |
1 files changed, 0 insertions, 32 deletions
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)) |
