Skip to content

Commit 5167f9f

Browse files
committed
Merge pull request #155 from Holzhaus/new-speakers
Cleanup client.speaker and add additional tts speakers
2 parents 433c3fc + 49037ca commit 5167f9f

File tree

5 files changed

+377
-69
lines changed

5 files changed

+377
-69
lines changed

client/musicmode.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from mic import Mic
88
import g2p
99
from music import *
10-
import speaker
1110
import stt
1211

1312

@@ -42,7 +41,7 @@ def __init__(self, PERSONA, mic):
4241

4342
# create a new mic with the new music models
4443
self.mic = Mic(
45-
speaker.newSpeaker(),
44+
mic.speaker,
4645
stt.PocketSphinxSTT(lmd_music="languagemodel_spotify.lm", dictd_music="dictionary_spotify.dic"),
4746
stt.PocketSphinxSTT(lmd_music="languagemodel_spotify.lm", dictd_music="dictionary_spotify.dic")
4847
)

client/speaker.py

-63
This file was deleted.

client/test.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import g2p
1313
import brain
1414
import jasperpath
15+
import tts
1516
from diagnose import Diagnostics
1617

1718
DEFAULT_PROFILE = {
@@ -189,6 +190,11 @@ def testWeather(self):
189190
"can't see that far ahead" in outputs[0]
190191
or "Tomorrow" in outputs[0])
191192

193+
class TestTTS(unittest.TestCase):
194+
def testTTS(self):
195+
tts_engine = tts.get_engine_by_slug('dummy-tts')
196+
tts_instance = tts_engine()
197+
tts_instance.say('This is a test.')
192198

193199
class TestBrain(unittest.TestCase):
194200

@@ -236,7 +242,7 @@ def testPriority(self):
236242
# Change CWD to jasperpath.LIB_PATH
237243
os.chdir(jasperpath.LIB_PATH)
238244

239-
test_cases = [TestBrain, TestModules, TestVocabCompiler]
245+
test_cases = [TestBrain, TestModules, TestVocabCompiler, TestTTS]
240246
if not args.light:
241247
test_cases.append(TestG2P)
242248
test_cases.append(TestMic)

0 commit comments

Comments
 (0)