Skip to content

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

@t41372

Description

@t41372

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions