def test_text_to_speech(self):
catch_requests()
text = ('hello')
audio = utils.text_to_speech(text=text, synthesizer=self.synthesizer, synth_args=self.synth_args, sentence_break='. ')
sample = AudioSegment.from_wav('tests/test_files/test.wav')
audio.export('.test_utils/test.mp3', format='mp3')
self.assertEquals(len(audio), len(sample))
评论列表
文章目录