Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup client.speaker and add additional tts speakers #155

Merged
merged 32 commits into from
Sep 27, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2a304ad
Cleanup client.speaker and add additional tts speakers (svox-pico-tts…
Holzhaus Aug 9, 2014
9bc89fe
Rename isAvailable() to is_available()
Holzhaus Sep 10, 2014
848957c
Added slugs to TTS engines
Holzhaus Sep 10, 2014
4ccfaf9
Improve is_available method
Holzhaus Sep 10, 2014
218f2c4
Actually include a phrase in eSpeakSpeaker.say()
Holzhaus Sep 10, 2014
bfae49a
Added logic to select the TTS engine from a slug
Holzhaus Sep 10, 2014
dfe1b6d
Getting tts engine from profile
Holzhaus Sep 11, 2014
b4d1e9a
Added missing import
Holzhaus Sep 11, 2014
7d49956
Remove unused import
Holzhaus Sep 15, 2014
7adb200
Add yaml import to speaker.py
Holzhaus Sep 15, 2014
cd3367c
Use slug in Exception
Holzhaus Sep 15, 2014
367a073
Added __main__ testing code to client/speaker.py
Holzhaus Sep 15, 2014
98ac755
Simplify is_available() method of osx-speaker
Holzhaus Sep 15, 2014
b390603
Fix missing brackets in speaker.py testing code
Holzhaus Sep 15, 2014
c00663d
Change AbstractSpeaker.play() to use aplay due to issues with PyAudio…
Holzhaus Sep 19, 2014
d0ab112
Change AbstractMP3Speaker.play_mp3() to use AbstractSpeaker.play()
Holzhaus Sep 19, 2014
af10754
Add better TTS engine detection/testing code
Holzhaus Sep 19, 2014
f73cf30
Use distutils.spawn.find_executable instead of which
Holzhaus Sep 19, 2014
16bea34
Use os.devnull instead of hardcoded /dev/null
Holzhaus Sep 19, 2014
570e3bd
Added logging system to client/speaker.py
Holzhaus Sep 19, 2014
407e393
Added festival TTS engine
Holzhaus Sep 22, 2014
b194e99
Added dummy tts engine (for testing purposes)
Holzhaus Sep 24, 2014
7427780
Check for `aplay` in AbstractSpeaker (because of af31dc5)
Holzhaus Sep 24, 2014
6f4d1c6
Remove TTS_ENGINES constant from `client/speaker.py`
Holzhaus Sep 24, 2014
dd9e464
Move tts_engine_slug to jasper.py, improve module functions of speake…
Holzhaus Sep 24, 2014
2d36db2
Move tts engine options from say method to __init__
Holzhaus Sep 24, 2014
645f91f
Rename `speaker.py` to `tts.py` to match `stt.py` and also change cla…
Holzhaus Sep 24, 2014
5aeddb1
Reuse speaker from mic in musicmode
Holzhaus Sep 24, 2014
4a95d86
Added testcase for tts with DummyTTS engine
Holzhaus Sep 24, 2014
321925e
Get rid of pyaudio in `tts.py`
Holzhaus Sep 24, 2014
bbc688e
Delete tempfiles in play_mp3() method of AbstractMp3TTSEngine
Holzhaus Sep 24, 2014
49037ca
Readd hardcoded alsa playback device (should be removed later)
Holzhaus Sep 26, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions client/musicmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from mic import Mic
import g2p
from music import *
import speaker
import stt


Expand Down Expand Up @@ -42,7 +41,7 @@ def __init__(self, PERSONA, mic):

# create a new mic with the new music models
self.mic = Mic(
speaker.newSpeaker(),
mic.speaker,
stt.PocketSphinxSTT(lmd_music="languagemodel_spotify.lm", dictd_music="dictionary_spotify.dic"),
stt.PocketSphinxSTT(lmd_music="languagemodel_spotify.lm", dictd_music="dictionary_spotify.dic")
)
Expand Down
63 changes: 0 additions & 63 deletions client/speaker.py

This file was deleted.

8 changes: 7 additions & 1 deletion client/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import g2p
import brain
import jasperpath
import tts
from diagnose import Diagnostics

DEFAULT_PROFILE = {
Expand Down Expand Up @@ -192,6 +193,11 @@ def testWeather(self):
"can't see that far ahead" in outputs[0]
or "Tomorrow" in outputs[0])

class TestTTS(unittest.TestCase):
def testTTS(self):
tts_engine = tts.get_engine_by_slug('dummy-tts')
tts_instance = tts_engine()
tts_instance.say('This is a test.')

class TestBrain(unittest.TestCase):

Expand Down Expand Up @@ -239,7 +245,7 @@ def testPriority(self):
# Change CWD to jasperpath.LIB_PATH
os.chdir(jasperpath.LIB_PATH)

test_cases = [TestBrain, TestModules, TestVocabCompiler]
test_cases = [TestBrain, TestModules, TestVocabCompiler, TestTTS]
if not args.light:
test_cases.append(TestG2P)
test_cases.append(TestMic)
Expand Down
Loading