diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-08-09 20:01:26 -0700 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-08-09 20:01:26 -0700 |
| commit | a510d85e6e594172e31c622312309e2c5cbd9f0b (patch) | |
| tree | 645f0328db5fe2a3f2edd21b73a80851021747d5 /client/main.py | |
| parent | 10a57e25f29bd4cdf8caf50d1ebeff20ac506b9d (diff) | |
| parent | 1eb5e58379f463f322e62a37ece2c2bd6d61c67d (diff) | |
| download | jasper-client-a510d85e6e594172e31c622312309e2c5cbd9f0b.tar.gz jasper-client-a510d85e6e594172e31c622312309e2c5cbd9f0b.zip | |
Merge pull request #118 from astahlman/master
LGTM! Thanks for the fine work and revisions.
Diffstat (limited to 'client/main.py')
| -rw-r--r-- | client/main.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/client/main.py b/client/main.py index 6ba3645..3fc728f 100644 --- a/client/main.py +++ b/client/main.py @@ -1,6 +1,7 @@ import yaml import sys import speaker +import stt from conversation import Conversation @@ -21,8 +22,18 @@ 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: + api_key = profile['keys']['GOOGLE_SPEECH'] + except KeyError: + api_key = None + + try: + stt_engine_type = profile['stt_engine'] + except KeyError: + print "stt_engine not specified in profile, defaulting to PocketSphinx" + stt_engine_type = "sphinx" + + mic = Mic(speaker.newSpeaker(), stt.PocketSphinxSTT(), stt.newSTTEngine(stt_engine_type, api_key=api_key)) addendum = "" if 'first_name' in profile: |
