Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot save to mp3 or wav on macOS and will freeze if the file extension is mp3 #10

Open
t41372 opened this issue Jul 23, 2024 · 0 comments

Comments

@t41372
Copy link

t41372 commented Jul 23, 2024

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.

img1

In addition, if the specified file extension is mp3, the program will freeze and not do anything.
img2

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant