From 84a92e5327997815488276021e5498f7681ab2d7 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 8 Jun 2014 20:39:35 -0700 Subject: Stop hardcoding /home/jasper and abstract out mic.say for multiplatform support --- client/test.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'client/test.py') diff --git a/client/test.py b/client/test.py index 80191ca..fb7d147 100644 --- a/client/test.py +++ b/client/test.py @@ -1,3 +1,8 @@ +import os + +if os.environ.get('JASPER_HOME') is None: + os.environ['JASPER_HOME'] = '/home/pi' + import unittest import argparse from mock import patch @@ -6,6 +11,7 @@ import yaml import test_mic import g2p import brain +import speaker def activeInternet(): @@ -23,7 +29,7 @@ class TestMic(unittest.TestCase): self.time_clip = "../static/audio/time.wav" from mic import Mic - self.m = Mic("languagemodel.lm", "dictionary.dic", + self.m = Mic(speaker.newSpeaker(), "languagemodel.lm", "dictionary.dic", "languagemodel_persona.lm", "dictionary_persona.dic") def testTranscribeJasper(self): -- cgit v1.3.1