summaryrefslogtreecommitdiff
path: root/jasper.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-09-24 16:59:48 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2014-09-26 13:34:48 +0200
commit6e55abfb09c611abf961cbd4c53e286b39ff6218 (patch)
treec75e47e25e218d7a1b141a0947ad93ac55a9f81a /jasper.py
parentee27d799fe83bdcf88093649f92c7127d4236cf5 (diff)
downloadjasper-client-6e55abfb09c611abf961cbd4c53e286b39ff6218.tar.gz
jasper-client-6e55abfb09c611abf961cbd4c53e286b39ff6218.zip
Rename `speaker.py` to `tts.py` to match `stt.py` and also change class names
Diffstat (limited to 'jasper.py')
-rwxr-xr-xjasper.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/jasper.py b/jasper.py
index 1846b8e..ece9e20 100755
--- a/jasper.py
+++ b/jasper.py
@@ -11,8 +11,7 @@ import yaml
import argparse
from client.diagnose import Diagnostics
-from client import vocabcompiler, stt, jasperpath
-from client import speaker as speak
+from client import vocabcompiler, tts, stt, jasperpath
from client.conversation import Conversation
parser = argparse.ArgumentParser(description='Jasper Voice Control Center')
@@ -56,16 +55,16 @@ class Jasper(object):
try:
tts_engine_slug = self.config['tts_engine']
except KeyError:
- tts_engine_slug = speak.get_default_engine_slug()
+ tts_engine_slug = tts.get_default_engine_slug()
logger.warning("tts_engine not specified in profile, defaulting to '%s'", tts_engine_slug)
- tts_engine = speak.get_engine_by_slug(tts_engine_slug)
+ tts_engine_class = tts.get_engine_by_slug(tts_engine_slug)
# Compile dictionary
sentences, dictionary, languagemodel = [os.path.abspath(os.path.join(jasperpath.LIB_PATH, filename)) for filename in ("sentences.txt", "dictionary.dic", "languagemodel.lm")]
vocabcompiler.compile(sentences, dictionary, languagemodel)
# Initialize Mic
- self.mic = Mic(tts_engine(), stt.PocketSphinxSTT(), stt.newSTTEngine(stt_engine_type, api_key=api_key))
+ self.mic = Mic(tts_engine_class(), stt.PocketSphinxSTT(), stt.newSTTEngine(stt_engine_type, api_key=api_key))
def run(self):
if 'first_name' in self.config: