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
def test_create(self): with self.assertRaises(NotImplementedError) as context: Speaker() self.assertIn('No available text to speech service chosen.', str(context.exception))
def setUp(self): self.speaker = Speaker(service='say')
def setUp(self): self.speaker = Speaker(service='espeak')