[PR #5237] [CLOSED] feat:Compress Large Audio Files (< 25 MB) & Integrate GroqAI Transcription #8443

Closed
opened 2025-11-11 17:56:51 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/5237
Author: @bekmuradov
Created: 9/6/2024
Status: Closed

Base: devHead: main


📝 Commits (9)

  • 05c0423 Merge pull request #5197 from open-webui/dev
  • 4617f3a Merge pull request #5200 from open-webui/dev
  • 4fdc291 Add file compressor if the file is more than 25MB
  • e387320 Add groqai transcription
  • 58ebc80 Refactor and clean up the code
  • 8fb857a Create file validator utils
  • fe35ae6 Define supported audio mime types and file size constants
  • c2ff489 Install nprogress - progress bar
  • 4629f3c Use file validators and show upload progress

📊 Changes

11 files changed (+429 additions, -129 deletions)

View changed files

📝 backend/open_webui/apps/audio/main.py (+188 -87)
📝 backend/open_webui/config.py (+12 -0)
📝 backend/open_webui/constants.py (+4 -1)
backend/open_webui/utils/compress_audio.py (+34 -0)
📝 package-lock.json (+15 -0)
📝 package.json (+2 -0)
📝 src/lib/components/admin/Settings/Audio.svelte (+42 -0)
📝 src/lib/components/workspace/Documents.svelte (+69 -37)
📝 src/lib/constants.ts (+15 -4)
src/lib/utils/documents/file-validator.ts (+47 -0)
src/lib/utils/documents/index.ts (+1 -0)

📄 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 for validating 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 cleary 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

  1. Compress large audio files: Both OpenAI Whisper and GroqAI transcription endpoints have a file size limit of 25 MB. Currently, OpenWebUI doesn't validate file sizes during upload or show progress while processing. It would be useful to automatically compress files larger than 25 MB to stay within this limit.

  2. Integrate GroqAI Transcription: GroqAI transcription is faster than OpenAI Whisper, and adding it as an option could improve the overall user experience.

Added

  • compress_audio.py, file_validator, file size constants, groqai stt api env variables, and nprogress npm package for progress bar

Changed

  • refactored /apps/audio/main.py transcriptions endpoint
  • Document.svelte workspace

Deprecated

Removed

Fixed

Security

Breaking Changes


Additional Information

Screenshots or Videos


🔄 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/5237 **Author:** [@bekmuradov](https://github.com/bekmuradov) **Created:** 9/6/2024 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `main` --- ### 📝 Commits (9) - [`05c0423`](https://github.com/open-webui/open-webui/commit/05c0423d6eba64c78fbcfeda4059e54160d2fd35) Merge pull request #5197 from open-webui/dev - [`4617f3a`](https://github.com/open-webui/open-webui/commit/4617f3a4e277a716ab75460934257813d8865663) Merge pull request #5200 from open-webui/dev - [`4fdc291`](https://github.com/open-webui/open-webui/commit/4fdc2919482cd12b80c2c5ff624794ab28894a59) Add file compressor if the file is more than 25MB - [`e387320`](https://github.com/open-webui/open-webui/commit/e38732000b955f3afd2074c45e1b035914b4b620) Add groqai transcription - [`58ebc80`](https://github.com/open-webui/open-webui/commit/58ebc80bd5fbe2783a48d747cf9a21027cedd929) Refactor and clean up the code - [`8fb857a`](https://github.com/open-webui/open-webui/commit/8fb857a41b844fe27662f593267f3b04d4c36f40) Create file validator utils - [`fe35ae6`](https://github.com/open-webui/open-webui/commit/fe35ae606a8084d7d422085bbdc43edd2b0cb9ee) Define supported audio mime types and file size constants - [`c2ff489`](https://github.com/open-webui/open-webui/commit/c2ff48970ccbc95745bca50c51f826b99ec0c921) Install nprogress - progress bar - [`4629f3c`](https://github.com/open-webui/open-webui/commit/4629f3c91502b32d774f1ff3106b289898371a09) Use file validators and show upload progress ### 📊 Changes **11 files changed** (+429 additions, -129 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/apps/audio/main.py` (+188 -87) 📝 `backend/open_webui/config.py` (+12 -0) 📝 `backend/open_webui/constants.py` (+4 -1) ➕ `backend/open_webui/utils/compress_audio.py` (+34 -0) 📝 `package-lock.json` (+15 -0) 📝 `package.json` (+2 -0) 📝 `src/lib/components/admin/Settings/Audio.svelte` (+42 -0) 📝 `src/lib/components/workspace/Documents.svelte` (+69 -37) 📝 `src/lib/constants.ts` (+15 -4) ➕ `src/lib/utils/documents/file-validator.ts` (+47 -0) ➕ `src/lib/utils/documents/index.ts` (+1 -0) </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. - [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/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 for validating 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 cleary 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 1. **Compress large audio files**: Both OpenAI Whisper and GroqAI transcription endpoints have a file size limit of 25 MB. Currently, OpenWebUI doesn't validate file sizes during upload or show progress while processing. It would be useful to automatically compress files larger than 25 MB to stay within this limit. 2. **Integrate GroqAI Transcription**: GroqAI transcription is faster than OpenAI Whisper, and adding it as an option could improve the overall user experience. ### Added - compress_audio.py, file_validator, file size constants, groqai stt api env variables, and nprogress npm package for progress bar ### Changed - refactored /apps/audio/main.py transcriptions endpoint - Document.svelte workspace ### Deprecated - ### Removed - ### Fixed - ### Security - ### Breaking Changes - --- ### Additional Information - Link to discussion https://github.com/open-webui/open-webui/discussions/5236 ### Screenshots or Videos - --- <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 2025-11-11 17:56:51 -06: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#8443