Using the pyttsx3
text-to-speech library, I'm saving the audio files during the iteration of the list of strings.
The program is always stacked on the second round after saving the file.
What may possibly be the cause of this behavior?
import pyttsx3
engine = pyttsx3.init()
names = ["1", "2", "3", "4", "5", "6", "7"]
for idx, name in enumerate(names):
print(name)
engine.save_to_file('Hello World', f'test-{idx}.mp3')
engine.runAndWait()
When looping the same list of data, there is no issue with the engine.say('Hello World')
method.