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/Time.py | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 client/modules/Time.py (limited to 'client/modules/Time.py') diff --git a/client/modules/Time.py b/client/modules/Time.py deleted file mode 100644 index 2fe8a10..0000000 --- a/client/modules/Time.py +++ /dev/null @@ -1,33 +0,0 @@ -import datetime -import re -from app_utils import getTimezone -from semantic.dates import DateService - -WORDS = ["TIME"] - - -def handle(text, mic, profile): - """ - Reports the current time based on the user's timezone. - - 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) - """ - - tz = getTimezone(profile) - now = datetime.datetime.now(tz=tz) - service = DateService() - response = service.convertTime(now) - mic.say("It is %s right now." % response) - - -def isValid(text): - """ - Returns True if input is related to the time. - - Arguments: - text -- user-input, typically transcribed speech - """ - return bool(re.search(r'\btime\b', text, re.IGNORECASE)) -- cgit v1.3.1