[Enhancement] Adding support for gpt-4o-audio#61
Merged
Conversation
vipul-mittal
approved these changes
Nov 13, 2025
zephyrzilla
approved these changes
Nov 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements support for OpenAI's
gpt-4o-audiomultimodal model in SyGra. Unlike traditional TTS models (tts-1) that use theaudio.speech.createAPI, gpt-4o-audio uses thechat.completions.createAPI and supports bidirectional audio/text transformations with context-aware conversational responses.Features implemented:
audio_urlformat to OpenAI'sinput_audioformat with proper data and format fieldsPerformance impact (if any):
N/A - No significant performance impact. The implementation adds a lightweight routing check and uses existing client infrastructure instead of manual processing.
How to Test
Prerequisites
export OPENAI_API_KEY=your_key_hereTest Case 1: Text-to-Audio (TTS via Chat Completions)
Steps:
multimodal_output/audio/Test Case 2: Audio-to-Text (Transcription)
Steps:
Test Case 3: Audio-to-Audio (Translation/Transformation)
Steps:
Test Case 4: Run Unit Tests
Expected Result: All tests should pass
Screenshots (if applicable)
N/A
Example Configuration:
Example Output:
{ "id": "record_0", "response": "file:multimodal_output/audio/record_0_response_0.wav" }Checklist