diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-07-30 03:36:53 +0000 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-07-30 03:36:53 +0000 |
| commit | 1eb5e58379f463f322e62a37ece2c2bd6d61c67d (patch) | |
| tree | 645f0328db5fe2a3f2edd21b73a80851021747d5 /client/populate.py | |
| parent | 577d630ad2110fbde73008c2ba96f38319024334 (diff) | |
| download | jasper-client-1eb5e58379f463f322e62a37ece2c2bd6d61c67d.tar.gz jasper-client-1eb5e58379f463f322e62a37ece2c2bd6d61c67d.zip | |
Prompt user to populate stt_engine in profile
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") |
