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/populate.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/populate.py')
| -rw-r--r-- | client/populate.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/client/populate.py b/client/populate.py index 48b8670..dd5ca48 100644 --- a/client/populate.py +++ b/client/populate.py @@ -4,7 +4,6 @@ import yaml from pytz import timezone import feedparser - def run(): profile = {} @@ -84,6 +83,26 @@ def run(): response = raw_input("Please choose email (E) or text message (T): ") profile['prefers_email'] = (response == 'E') + stt_engines = { + "sphinx" : None, + "google" : "GOOGLE_SPEECH" + } + + response = raw_input( + "\nIf you would like to choose a specific STT engine, please specify which." + + "\nAvailable implementations: %s. (Press Enter to default to PocketSphinx): " % stt_engines.keys()) + if (response in stt_engines): + profile["stt_engine"] = response + api_key_name = stt_engines[response] + if api_key_name: + key = raw_input("\nPlease enter your API key: ") + profile["keys"] = { api_key_name : key } + else: + print("Unrecognized STT engine. Available implementations: %s" % stt_engines.keys()) + profile["stt_engine"] = "sphinx" + + + # write to profile print("Writing to profile...") outputFile = open("profile.yml", "w") |
