1

I am working on a project involving pyttsx3 TTS, since I prefer my TTS to happen offline and not hit any API limits. Thus, I chose pyttsx3, since it lets me save to file (in principle). However, it seems that

engine.init()
engine.save_to_file(text, file)
engine.runAndWait()

does not wait long enough to save to the requested file, should the string be too long. If I add

time.sleep(10)

to the end, the file appears. In a project with a multitude of files being TTS'd sequentially, they all end up in the same folder, but that is another issue.

Am I interpreting this correctly? Whether or not I am, does anyone know a solution or better library to use?

I have tested this on two arch linux machines.

Thank you for your input.

SkyeS
  • 11
  • 3

0 Answers0