[PR #11737] [CLOSED] Enhance OpenAI TTS Voice Parameter Handling #22785

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

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/11737
Author: @roeizavida
Created: 3/16/2025
Status: Closed

Base: devHead: feat/tts-voice-json


📝 Commits (1)

  • 1c01213 feat: support both string and JSON object formats for OpenAI TTS voice parameter

📊 Changes

1 file changed (+15 additions, -1 deletions)

View changed files

📝 backend/open_webui/routers/audio.py (+15 -1)

📄 Description

This pull request introduces support for both string and JSON object formats for the voice parameter in the OpenAI TTS implementation.
Previously, the system only accepted a simple string for the voice setting, which limited compatibility with services requiring more complex configurations, such as Vertex AI TTS using the LiteLLM proxy.
With this update, the code now attempts to parse the TTS_VOICE configuration value. If it can be successfully parsed as a JSON object, it will be used as such; otherwise, the original string value will be utilized.


🔄 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/11737 **Author:** [@roeizavida](https://github.com/roeizavida) **Created:** 3/16/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/tts-voice-json` --- ### 📝 Commits (1) - [`1c01213`](https://github.com/open-webui/open-webui/commit/1c012133c0588e09f39c65f380742e446dc5aff2) feat: support both string and JSON object formats for OpenAI TTS voice parameter ### 📊 Changes **1 file changed** (+15 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/audio.py` (+15 -1) </details> ### 📄 Description This pull request introduces support for both string and JSON object formats for the voice parameter in the OpenAI TTS implementation. Previously, the system only accepted a simple string for the voice setting, which limited compatibility with services requiring more complex configurations, such as Vertex AI TTS using the LiteLLM proxy. With this update, the code now attempts to parse the TTS_VOICE configuration value. If it can be successfully parsed as a JSON object, it will be used as such; otherwise, the original string value will be utilized. --- <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:23:58 -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#22785