summaryrefslogtreecommitdiff
path: root/client/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'client/main.py')
-rw-r--r--client/main.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/client/main.py b/client/main.py
index 6ba3645..ccafdb9 100644
--- a/client/main.py
+++ b/client/main.py
@@ -1,6 +1,8 @@
import yaml
import sys
import speaker
+import stt
+from stt import PocketSphinxSTT
from conversation import Conversation
@@ -21,8 +23,13 @@ if __name__ == "__main__":
profile = yaml.safe_load(open("profile.yml", "r"))
- mic = Mic(speaker.newSpeaker(), "languagemodel.lm", "dictionary.dic",
- "languagemodel_persona.lm", "dictionary_persona.dic")
+ try:
+ google_api_key = profile['google_api_key']
+ except KeyError:
+ print "Google STT API Key not present in profile - defaulting to PocketSphinx..."
+ google_api_key = None
+
+ mic = Mic(speaker.newSpeaker(), PocketSphinxSTT(), stt.newSTTEngine(google_api_key))
addendum = ""
if 'first_name' in profile: