summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-07-30 03:36:53 +0000
committerschneefux <schneefux+commit@schneefux.xyz>2014-07-30 03:36:53 +0000
commit1eb5e58379f463f322e62a37ece2c2bd6d61c67d (patch)
tree645f0328db5fe2a3f2edd21b73a80851021747d5 /client
parent577d630ad2110fbde73008c2ba96f38319024334 (diff)
downloadjasper-client-1eb5e58379f463f322e62a37ece2c2bd6d61c67d.tar.gz
jasper-client-1eb5e58379f463f322e62a37ece2c2bd6d61c67d.zip
Prompt user to populate stt_engine in profile
Diffstat (limited to 'client')
-rw-r--r--client/populate.py21
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")