Environment
- macOS 14.5, m1 pro
- Python 3.11.9
Code
Here is the code to reproduce the issue:
import pyttsx3
engine = pyttsx3.init()
engine.save_to_file('I will speak this text', './test.mp3')
engine.runAndWait()
Issue
The save_to_file function only produces aiff files regardless of the file extension.
The file extension of the generated audio will respect the user's input, but the actual format will still be aiff.
For example, I did engine.save_to_file('I will speak this text', './test.wav'), which produced the test.wav file. However, checking the audio file with ffprobe shows that the format is actually aiff.
In addition, if the specified file extension is mp3, the program will freeze and not do anything.

I haven't tested other audio formats, and I haven't tested this on other OS.
Environment
Code
Here is the code to reproduce the issue:
Issue
The
save_to_filefunction only producesaifffiles regardless of the file extension.The file extension of the generated audio will respect the user's input, but the actual format will still be
aiff.For example, I did
engine.save_to_file('I will speak this text', './test.wav'), which produced thetest.wavfile. However, checking the audio file with ffprobe shows that the format is actually aiff.In addition, if the specified file extension is mp3, the program will freeze and not do anything.

I haven't tested other audio formats, and I haven't tested this on other OS.