Skip to content

Conversation

@sunyuhan1998
Copy link
Contributor

@sunyuhan1998 sunyuhan1998 commented Jun 17, 2025

As mentioned in the issue, there is currently a problem where the filename gets overwritten when requesting OpenAI's /audio/translations and /audio/transcriptions interfaces, leading to request failures.

The root cause lies in the code prior to this PR, specifically in the org.springframework.ai.openai.OpenAiAudioTranscriptionModel#createRequest method. When converting the Resource to a byte[], the original filename information was lost, resulting in a hardcoded filename "audio.webm" being used when sending requests to the OpenAI API, which is clearly unreasonable.

This PR fixes the issue by preserving and passing the original filename to the REST interface.

Fixed #3557

…lename was lost when requesting the OpenAI `/transcriptions` and `/translations` interfaces.

Signed-off-by: Sun Yuhan <[email protected]>
@ilayaperumalg
Copy link
Member

@sunyuhan1998 Thanks for the PR!

@ilayaperumalg
Copy link
Member

@sunyuhan1998 Thanks for the PR fixing the issue. Rebased and merged as af07517

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transcription API File Extension Issue

2 participants