mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[PR #12603] [MERGED] fix: Convert ogg to wav for OpenAI transcription endpoint #22985
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/12603
Author: @tremlin
Created: 4/8/2025
Status: ✅ Merged
Merged: 4/10/2025
Merged by: @tjbck
Base:
dev← Head:fix-convert-ogg-container-openai-transcription📝 Commits (2)
d99a883fix: convert ogg to wav for OpenAI transcription endpoint4731e0dfix: convert webm to wav for OpenAI transcription endpoint📊 Changes
1 file changed (+20 additions, -11 deletions)
View changed files
📝
backend/open_webui/routers/audio.py(+20 -11)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
On my Firefox/Ubuntu system (
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0) the browser generates anoggaudio container when recording audio for transcription. This container format is not supported by the OpenAI API (https://platform.openai.com/docs/guides/speech-to-text) and has to be converted.Also Chrome and Safari generate WebM in our case, which also is not supported.
There already is a conversion method for MP4, which I extend to OGG and WebM.
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.