mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #1569] [CLOSED] feat: TTS support for openedai-speech external api #7502
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/1569
Author: @ghost
Created: 4/16/2024
Status: ❌ Closed
Base:
dev← Head:openedai-speech-external-support📝 Commits (8)
0946bf1Ignore ollama-data dirdee87c7Support a local openedai-speech server separate from ollama4d4206dIgnore .vscode/a61a7e2Properly join paths2b53302Merge branch 'open-webui:main' into masterbeff0a3feat: TTS support for openedai-speech external api4f32925Merge branch 'dev' into openedai-speech-external-support3f309d1Format fixes📊 Changes
10 files changed (+302 additions, -8 deletions)
View changed files
📝
.gitignore(+5 -1)📝
backend/apps/openai/main.py(+50 -3)📝
backend/config.py(+15 -0)➕
docker-compose.customized.yaml(+8 -0)➕
run-customized.sh(+25 -0)📝
src/lib/apis/openai/index.ts(+92 -0)📝
src/lib/components/chat/Messages/ResponseMessage.svelte(+75 -1)📝
src/lib/components/chat/Settings/Audio.svelte(+29 -2)📝
src/lib/i18n/locales/en-US/translation.json(+1 -0)📝
src/lib/utils/index.ts(+2 -1)📄 Description
Pull Request Checklist
Description
Add optional support for the openedai-speech TTS speech engine API. The ENABLE & BASE_URL variables must be set to activate integration. SPEECH_VOICES can be set to limit or add voices to match the backend openedai-speech configuration. The default voice is
alloymatching the OpenAI implementation.Seems to be working well. I've only tested using the minimal Docker container without CUDA & GPU:
--env 'ENABLE_OPENEDAI_SPEECH=true' --env 'OPENEDAI_SPEECH_BASE_URL=http://127.0.0.1:8000/v1'.Based on work by @jmtatsch. Thanks!
Edit: Oops, I meant to tag @lee-b.
Changelog Entry
Added
config.pyto add the environment variables: ENABLE_OPENEDAI_SPEECH (default: false), OPENEDAI_SPEECH_BASE_URL (default: ''), and OPENEDAI_SPEECH_VOICES (default:alloy;echo;fable;onyx;nova;shimmer).get_openedai_audio_voices()&get_openedai_audio_enabled().synthesizeOpenedAISpeech(),getOpenedAISpeechEnabled(), andgetOpenedAISpeechVoices()Fixed
Changed
speech()backend function with/opened/audio/speechpath alias.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.