[PR #12603] [MERGED] fix: Convert ogg to wav for OpenAI transcription endpoint #22985

Closed
opened 2026-04-20 04:33:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 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: devHead: fix-convert-ogg-container-openai-transcription


📝 Commits (2)

  • d99a883 fix: convert ogg to wav for OpenAI transcription endpoint
  • 4731e0d fix: 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:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests to validate the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
    • BREAKING CHANGE: Significant changes that may affect compatibility
    • build: Changes that affect the build system or external dependencies
    • ci: Changes to our continuous integration processes or workflows
    • chore: Refactor, cleanup, or other non-functional code changes
    • docs: Documentation update or addition
    • feat: Introduces a new feature or enhancement to the codebase
    • fix: Bug fix or error correction
    • i18n: Internationalization or localization changes
    • perf: Performance improvement
    • refactor: Code restructuring for better maintainability, readability, or scalability
    • style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
    • test: Adding missing tests or correcting existing tests
    • WIP: Work in progress, a temporary label for incomplete or ongoing work

Changelog Entry

Description

  • Support ogg and webm audio container formats for OpenAI transcriptions.

Added

Changed

Deprecated

Removed

Fixed

  • Support ogg and webm audio container formats for OpenAI transcriptions.

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 an ogg audio 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

2025-04-08-125047-screenshot
2025-04-08-125136-screenshot
2025-04-08-125253-screenshot


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/12603 **Author:** [@tremlin](https://github.com/tremlin) **Created:** 4/8/2025 **Status:** ✅ Merged **Merged:** 4/10/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fix-convert-ogg-container-openai-transcription` --- ### 📝 Commits (2) - [`d99a883`](https://github.com/open-webui/open-webui/commit/d99a883867230293200fd212ecfa1257d18fbcc1) fix: convert ogg to wav for OpenAI transcription endpoint - [`4731e0d`](https://github.com/open-webui/open-webui/commit/4731e0d0e35eb44cb7f73a9b72c12fd04b42c2c4) fix: convert webm to wav for OpenAI transcription endpoint ### 📊 Changes **1 file changed** (+20 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/audio.py` (+20 -11) </details> ### 📄 Description # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request. **Before submitting, make sure you've checked the following:** - [X] **Target branch:** Please verify that the pull request targets the `dev` branch. - [X] **Description:** Provide a concise description of the changes made in this pull request. - [X] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [X] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [X] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [X] **Testing:** Have you written and run sufficient tests to validate the changes? - [X] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [X] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following: - **BREAKING CHANGE**: Significant changes that may affect compatibility - **build**: Changes that affect the build system or external dependencies - **ci**: Changes to our continuous integration processes or workflows - **chore**: Refactor, cleanup, or other non-functional code changes - **docs**: Documentation update or addition - **feat**: Introduces a new feature or enhancement to the codebase - **fix**: Bug fix or error correction - **i18n**: Internationalization or localization changes - **perf**: Performance improvement - **refactor**: Code restructuring for better maintainability, readability, or scalability - **style**: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.) - **test**: Adding missing tests or correcting existing tests - **WIP**: Work in progress, a temporary label for incomplete or ongoing work # Changelog Entry ### Description - Support ogg and webm audio container formats for OpenAI transcriptions. ### Added ### Changed ### Deprecated ### Removed ### Fixed - Support ogg and webm audio container formats for OpenAI transcriptions. ### 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 an `ogg` audio 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 ![2025-04-08-125047-screenshot](https://github.com/user-attachments/assets/cdb7a830-3333-4ada-a45d-a14af18b3eaa) ![2025-04-08-125136-screenshot](https://github.com/user-attachments/assets/ce1ca9ab-52ca-4797-92db-e3771a7e79c6) ![2025-04-08-125253-screenshot](https://github.com/user-attachments/assets/06837407-f5cc-4782-b015-d741862fbb3b) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 04:33:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#22985