Beispiel #1
0
class TestMic(unittest.TestCase):

    def setUp(self):
        self.jasper_clip = jasperpath.data('audio', 'jasper.wav')
        self.time_clip = jasperpath.data('audio', 'time.wav')

        from stt import PocketSphinxSTT
        self.stt = PocketSphinxSTT(**PocketSphinxSTT.get_config())

    def testTranscribeJasper(self):
        """
        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.assertIn("JASPER", transcription)

    def testTranscribe(self):
        """
        Does Jasper recognize 'time' (i.e., active listen)?
        """
        with open(self.time_clip, mode="rb") as f:
            transcription = self.stt.transcribe(f)
        self.assertIn("TIME", transcription)
Beispiel #2
0
    def setUp(self):
        self.jasper_clip = jasperpath.data('audio', 'jasper.wav')
        self.time_clip = jasperpath.data('audio', 'time.wav')

        from stt import PocketSphinxSTT
        self.passive_stt_engine = PocketSphinxSTT.get_passive_instance()
        self.active_stt_engine = PocketSphinxSTT.get_active_instance()
Beispiel #3
0
class TestMic(unittest.TestCase):

    def setUp(self):
        self.jasper_clip = jasperpath.data('audio', 'jasper.wav')
        self.time_clip = jasperpath.data('audio', 'time.wav')

        from stt import PocketSphinxSTT
        self.stt = PocketSphinxSTT()

    def testTranscribeJasper(self):
        """
        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.assertIn("JASPER", transcription)

    def testTranscribe(self):
        """
        Does Jasper recognize 'time' (i.e., active listen)?
        """
        with open(self.time_clip, mode="rb") as f:
            transcription = self.stt.transcribe(f)
        self.assertIn("TIME", transcription)
Beispiel #4
0
    def setUp(self):
        self.jasper_clip = jasperpath.data('audio', 'jasper.wav')
        self.time_clip = jasperpath.data('audio', 'time.wav')

        from stt import PocketSphinxSTT
        self.passive_stt_engine = PocketSphinxSTT.get_passive_instance()
        self.active_stt_engine = PocketSphinxSTT.get_active_instance()
Beispiel #5
0
class TestMic(unittest.TestCase):

    def setUp(self):
        self.jasper_clip = jasperpath.data('audio', 'jasper.wav')
        self.time_clip = jasperpath.data('audio', 'time.wav')

        from stt import PocketSphinxSTT
        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)
        self.assertTrue("JASPER" in transcription)

    def testTranscribe(self):
        """Does Jasper recognize 'time' (i.e., active listen)?"""
        transcription = self.stt.transcribe(self.time_clip)
        self.assertTrue("TIME" in transcription)
Beispiel #6
0
class TestMic(unittest.TestCase):
    def setUp(self):
        self.jasper_clip = "../static/audio/jasper.wav"
        self.time_clip = "../static/audio/time.wav"

        from stt import PocketSphinxSTT
        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)
        self.assertTrue("JASPER" in transcription)

    def testTranscribe(self):
        """Does Jasper recognize 'time' (i.e., active listen)?"""
        transcription = self.stt.transcribe(self.time_clip)
        self.assertTrue("TIME" in transcription)
Beispiel #7
0
    def setUp(self):
        self.jasper_clip = jasperpath.data('audio', 'jasper.wav')
        self.time_clip = jasperpath.data('audio', 'time.wav')

        from stt import PocketSphinxSTT
        self.stt = PocketSphinxSTT()
Beispiel #8
0
    def setUp(self):
        self.jasper_clip = "../static/audio/jasper.wav"
        self.time_clip = "../static/audio/time.wav"

        from stt import PocketSphinxSTT
        self.stt = PocketSphinxSTT()
Beispiel #9
0
    def setUp(self):
        self.jasper_clip = "../static/audio/jasper.wav"
        self.time_clip = "../static/audio/time.wav"

        from stt import PocketSphinxSTT
        self.stt = PocketSphinxSTT()
Beispiel #10
0
    def setUp(self):
        self.jasper_clip = os.path.join(jasperpath.DATA_PATH, "audio/jasper.wav")
        self.time_clip = os.path.join(jasperpath.DATA_PATH, "audio/time.wav")

        from stt import PocketSphinxSTT
        self.stt = PocketSphinxSTT()
Beispiel #11
0
    def setUp(self):
        self.jasper_clip = jasperpath.data('audio', 'jasper.wav')
        self.time_clip = jasperpath.data('audio', 'time.wav')

        from stt import PocketSphinxSTT
        self.stt = PocketSphinxSTT()