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

Add support for AAC audio encoding #299

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JonnyTran
Copy link

Fixes #295

Description

This PR adds support for AAC audio format conversion using FFmpeg through the ffmpeg-python binding. This is particularly useful for iOS applications that require AAC format when using OpenAI TTS backend.

Changes

  • Added ffmpeg-python as a new dependency
  • Modified convert_audio_format to handle AAC conversion
  • Moved "aac" from UNSUPORTED_RESPONSE_FORMATS to SUPPORTED_RESPONSE_FORMATS

Dependencies

  • Requires ffmpeg-python: pip install ffmpeg-python
  • System FFmpeg must be installed (already a requirement)

Testing

  • Tested AAC conversion with various input formats
  • Verified output plays correctly on iOS Speech Central app
  • All existing format conversions continue to work as before

Note

The implementation uses ffmpeg-python for cleaner and safer FFmpeg integration rather than direct subprocess calls. The conversion is done entirely in memory without touching the filesystem.

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

Successfully merging this pull request may close these issues.

Adding support for AAC audio encoding
1 participant