[PR #5313] [MERGED] feat: Added speech playback speed control for Call mode #8463

Closed
opened 2025-11-11 17:57:18 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/5313
Author: @zabirauf
Created: 9/10/2024
Status: Merged
Merged: 9/19/2024
Merged by: @tjbck

Base: dev-playback-controlsHead: u/zabirauf/speech-speed


📝 Commits (4)

  • f88a86f Fixed build error
  • b33ab6c Updated to use Dropdown menu which is being used elsewhere in app
  • 62b01c5 Cleaned up
  • 91cd8c7 Undid a unnecessary change

📊 Changes

1 file changed (+64 additions, -7 deletions)

View changed files

📝 src/lib/components/chat/MessageInput/CallOverlay.svelte (+64 -7)

📄 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

Currently the playback in call mode doesn't have speed control so to some people it maybe more efficient to listen it at 1.5x, 2x speed and for some others who may prefer to listen to it more slowly e.g. 0.5x, 0.75x. The new playback rate control allows users to pick the speed for the session of the call.

Added

The changes are in CallOverlay.svelte and it creates new state to show the playback speed control menu and maintain the rate state. The change leverages the playbackRate of the <audio/> element already part of WebAPI and also the rate property of SpeechSynthesisUtterance so the solution should be agnostic to any speech engine changes in future.

Screenshots or Videos

Unmute the following video to listen to speed changes

https://github.com/user-attachments/assets/6376e34c-d9cf-42cf-95e3-7ed68337f2a4

Screenshot 2024-09-09 at 22 05 37

🔄 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/5313 **Author:** [@zabirauf](https://github.com/zabirauf) **Created:** 9/10/2024 **Status:** ✅ Merged **Merged:** 9/19/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev-playback-controls` ← **Head:** `u/zabirauf/speech-speed` --- ### 📝 Commits (4) - [`f88a86f`](https://github.com/open-webui/open-webui/commit/f88a86f9b071ab8af7c132bce5c0aa643b60e36a) Fixed build error - [`b33ab6c`](https://github.com/open-webui/open-webui/commit/b33ab6c5fd772f5fdfc6726590319a198f5bcc05) Updated to use Dropdown menu which is being used elsewhere in app - [`62b01c5`](https://github.com/open-webui/open-webui/commit/62b01c5f8e62d75934c9389a1138658b4cde167e) Cleaned up - [`91cd8c7`](https://github.com/open-webui/open-webui/commit/91cd8c76080f42665785da9caca0bea56eb5369c) Undid a unnecessary change ### 📊 Changes **1 file changed** (+64 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/MessageInput/CallOverlay.svelte` (+64 -7) </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? - [x] **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 Currently the playback in call mode doesn't have speed control so to some people it maybe more efficient to listen it at 1.5x, 2x speed and for some others who may prefer to listen to it more slowly e.g. 0.5x, 0.75x. The new playback rate control allows users to pick the speed for the session of the call. ### Added The changes are in `CallOverlay.svelte` and it creates new state to show the playback speed control menu and maintain the rate state. The change leverages the `playbackRate` of the `<audio/>` element already part of WebAPI and also the `rate` property of `SpeechSynthesisUtterance` so the solution should be agnostic to any speech engine changes in future. ### Screenshots or Videos _Unmute the following video to listen to speed changes_ https://github.com/user-attachments/assets/6376e34c-d9cf-42cf-95e3-7ed68337f2a4 <img width="1336" alt="Screenshot 2024-09-09 at 22 05 37" src="https://github.com/user-attachments/assets/d631b616-6d1e-4f4e-9d33-a0ac2f2404ca"> --- <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:57:18 -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#8463