示例#1
0
 def __init__(self, listener=None, speaker=None):
     self.__listener = listener or Listener(
         service='sphinx')  # sphinx | google
     self.__speaker = speaker or Speaker(service='say')  # say | espeak
示例#2
0
    def test_create(self):
        with self.assertRaises(NotImplementedError) as context:
            Speaker()

        self.assertIn('No available text to speech service chosen.',
                      str(context.exception))
示例#3
0
 def setUp(self):
     self.speaker = Speaker(service='say')
示例#4
0
 def setUp(self):
     self.speaker = Speaker(service='espeak')