mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-10 15:54:15 -05:00
[PR #4886] [MERGED] feat: Add control for how message content is split for TTS generation requests #8376
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/4886
Author: @kiosion
Created: 8/25/2024
Status: ✅ Merged
Merged: 8/26/2024
Merged by: @tjbck
Base:
dev← Head:dev📝 Commits (5)
f304287fix: Safely retrieve settings from LocalStorage3967c34feat: Add control for how message content is split for TTS generation reqs73998a7i18n: Add new strings for en, fr localesd78c35crefac: Tidy Chat.sveltef4f7adbrefac📊 Changes
14 files changed (+426 additions, -238 deletions)
View changed files
📝
backend/apps/audio/main.py(+6 -0)📝
backend/config.py(+6 -0)📝
backend/main.py(+1 -0)📝
src/lib/apis/audio/index.ts(+5 -1)📝
src/lib/components/admin/Settings/Audio.svelte(+45 -16)📝
src/lib/components/chat/Chat.svelte(+96 -74)📝
src/lib/components/chat/Messages/ResponseMessage.svelte(+169 -126)📝
src/lib/i18n/locales/en-GB/translation.json(+4 -0)📝
src/lib/i18n/locales/en-US/translation.json(+4 -0)📝
src/lib/i18n/locales/fr-CA/translation.json(+5 -1)📝
src/lib/i18n/locales/fr-FR/translation.json(+4 -0)📝
src/lib/types/index.ts(+6 -0)📝
src/lib/utils/index.ts(+65 -18)📝
src/routes/(app)/+layout.svelte(+10 -2)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Add control for how message content is split up for TTS generation requests. This enables use of OAI's TTS API for larger responses without hitting their RPM limits (especially with
tts-1-hd's RPM being just 5). Options are 'punctuation' (current behaviour and default value), 'paragraphs' (split by newlines), and 'none' (send message content as single string).Tidy up
Audioadmin settings page andResponseMessagecomponent:toggleSpeakMessageto avoid deep cond nestingi18nfrom GetContext asWritable<i18next>Add error handling around loading settings from LocalStorage in
+layout.svelteto prevent app hanging if key exists but the content can't be parsed (might crop up if running front-end locally, and another project has set thesettingskey in LocalStorage forlocalhostpreviously).Added
Fixed
settingsLocalStorage key can't be parsed byJSON.parseon load.Additional Information
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.