Closed kurdishdevil closed 4 years ago
Thanks for the issue. Unfortunately the stack overflow question was deleted and the way back machine doesn't have a copy of the answer. Looking into it it seems I missed closing the stream, can you confirm that this code will fix the problem?
...
stream = self._create_stream(filename)
temp_stream = self.voice.AudioOutputStream
self.voice.AudioOutputStream = stream
self.say(message)
self.voice.AudioOutputStream = temp_stream
stream.Close()
sapitts doesn't close the stream after creating the file, so the code only works twice unless you have to restart the whole program,
here's my post on stackoverflow that shows how to fix it
https://stackoverflow.com/questions/59698230/sapitts-creates-the-file-but-keeps-it-running