diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-10-04 13:14:22 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-10-06 17:11:12 +0200 |
| commit | 93839394797d6f8d16967f875b189fb67a95aea3 (patch) | |
| tree | ce56990f0e232096af139caef9059b70692f5f6c /client | |
| parent | edca8b7407d7c9b1497ba1722d1b66ffa4b4c234 (diff) | |
| download | jasper-client-93839394797d6f8d16967f875b189fb67a95aea3.tar.gz jasper-client-93839394797d6f8d16967f875b189fb67a95aea3.zip | |
Fix TestMic testcase
This fixes jasperproject/jasper-client#212
Diffstat (limited to 'client')
| -rw-r--r-- | client/test.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/client/test.py b/client/test.py index 7366ef2..6eaaa5a 100644 --- a/client/test.py +++ b/client/test.py @@ -13,6 +13,7 @@ import g2p import brain import jasperpath import tts +from stt import TranscriptionMode from diagnose import Diagnostics DEFAULT_PROFILE = { @@ -68,14 +69,20 @@ class TestMic(unittest.TestCase): self.stt = PocketSphinxSTT() def testTranscribeJasper(self): - """Does Jasper recognize his name (i.e., passive listen)?""" - transcription = self.stt.transcribe(self.jasper_clip, - PERSONA_ONLY=True) + """ + Does Jasper recognize his name (i.e., passive listen)? + """ + with open(self.jasper_clip, mode="rb") as f: + transcription = self.stt.transcribe(f, + mode=TranscriptionMode.KEYWORD) self.assertTrue("JASPER" in transcription) def testTranscribe(self): - """Does Jasper recognize 'time' (i.e., active listen)?""" - transcription = self.stt.transcribe(self.time_clip) + """ + Does Jasper recognize 'time' (i.e., active listen)? + """ + with open(self.time_clip, mode="rb") as f: + transcription = self.stt.transcribe(f) self.assertTrue("TIME" in transcription) |
