Skip to content

Commit 47ff261

Browse files
committed
Merge main into dev
2 parents 2b0a383 + 2b3bd63 commit 47ff261

6 files changed

Lines changed: 77 additions & 4 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Summary
2+
3+
<!-- Briefly describe what this PR changes and why it benefits Open WebUI users. -->
4+
5+
## Related issue or discussion
6+
7+
<!-- Link the issue or discussion this PR resolves, if one exists. -->
8+
9+
## Checklist
10+
11+
- [ ] I have reviewed the relevant documentation and matched the existing style.
12+
- [ ] This PR meets Open WebUI's contribution standards: it is accurate, relevant to users, narrowly scoped, maintainable, and not promotional content, advertising, lead generation, SEO placement, or a request to list a product, service, provider, integration, gateway, tool, or company primarily for visibility.
13+
- [ ] I understand that PRs that do not meet these standards may be closed without review and will not be merged. Repeated, low-quality, off-topic, promotional, or intentionally misleading submissions may result in the contributor being blocked from future participation in Open WebUI repositories.
14+
15+
## Notes for reviewers
16+
17+
<!-- Add screenshots, validation steps, or other context reviewers should know. -->

docs/features/chat-conversations/audio/text-to-speech/openai-tts-integration.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,62 @@ services:
112112
| `AUDIO_TTS_MODEL` | TTS model (`tts-1` or `tts-1-hd`) | `tts-1` |
113113
| `AUDIO_TTS_VOICE` | Voice to use | `alloy` |
114114

115+
## Using OpenRouter as a Text-to-Speech Provider
116+
117+
Open WebUI's `OpenAI` TTS engine is compatible with any service that implements the OpenAI Audio API, including [OpenRouter](https://openrouter.ai). This section explains how to configure OpenRouter as your TTS provider and how to avoid a common `400 Bad Request` error.
118+
119+
### Why the 400 Error Happens
120+
121+
OpenRouter's [`/audio/speech` endpoint](https://openrouter.ai/docs/guides/overview/multimodal/tts) defaults `response_format` to `pcm` when the field is omitted. Open WebUI does not send `response_format` in its request payload, so OpenRouter returns raw PCM audio, which Open WebUI cannot play back — resulting in a `400 Bad Request`.
122+
123+
The fix is to explicitly request MP3 by adding `{"response_format": "mp3"}` to the **OpenAI Params** field (extra parameters) in the TTS settings.
124+
125+
### Quick Setup (UI)
126+
127+
1. Click your **profile icon** (bottom-left corner)
128+
2. Select **Admin Panel**
129+
3. Click **Settings****Audio** tab → **Text-to-Speech Settings**
130+
4. Configure the following:
131+
132+
| Setting | Value |
133+
|---------|-------|
134+
| **Text-to-Speech Engine** | `OpenAI` |
135+
| **API Base URL** | `https://openrouter.ai/api/v1` |
136+
| **API Key** | Your OpenRouter API key (`sk-or-...`) |
137+
| **TTS Model** | Any OpenRouter TTS model, e.g. `openai/tts-1` |
138+
| **TTS Voice** | Choose from available voices |
139+
| **OpenAI Params** | `{"response_format": "mp3"}` |
140+
141+
:::important
142+
143+
The **OpenAI Params** field must contain `{"response_format": "mp3"}`. Without it, OpenRouter defaults to `pcm`, and speech requests fail with a `400 Bad Request` error.
144+
:::
145+
146+
5. Click **Save**
147+
148+
### Environment Variables Setup
149+
150+
If you prefer to configure via environment variables, add the parameters JSON via `AUDIO_TTS_OPENAI_PARAMS`:
151+
152+
```yaml
153+
services:
154+
open-webui:
155+
image: ghcr.io/open-webui/open-webui:main
156+
environment:
157+
- AUDIO_TTS_ENGINE=openai
158+
- AUDIO_TTS_OPENAI_API_BASE_URL=https://openrouter.ai/api/v1
159+
- AUDIO_TTS_OPENAI_API_KEY=sk-or-...
160+
- AUDIO_TTS_MODEL=openai/tts-1
161+
- AUDIO_TTS_VOICE=alloy
162+
- AUDIO_TTS_OPENAI_PARAMS={"response_format":"mp3"}
163+
# ... other configuration
164+
```
165+
166+
:::info
167+
168+
OpenRouter supports `mp3` and `pcm` output formats. Always select `mp3` in Open WebUI — PCM output is intended for real-time streaming pipelines and cannot be played back by Open WebUI.
169+
:::
170+
115171
## Testing TTS
116172

117173
1. Start a new chat

docs/features/extensibility/mcp.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ No configuration is needed on the Open WebUI side: the resource indicator is dis
141141

142142
If an OAuth 2.1 tool is set as a default and the user hasn't previously authenticated (or their refresh token has expired), the tool call will fail with **"Failed to connect to MCP server"** because the backend cannot initiate the browser-based auth flow mid-request.
143143

144-
**Workaround:** Users should manually enable OAuth 2.1 tools per-chat via the **** button in the chat input area. This triggers the auth flow before the tool is ever invoked. Token refresh works automatically once the initial authentication is complete.
144+
**Workaround:** Users should manually enable OAuth 2.1 tools per-chat via the **Integrations** menu in the chat input area. This triggers the auth flow before the tool is ever invoked. Token refresh works automatically once the initial authentication is complete.
145145
:::
146146

147147
### Connection URLs

docs/features/extensibility/plugin/tools/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Never import a Tool you don’t recognize or trust. These are Python scripts and
8383
🔧 Once installed or connected, here’s how to enable them for your conversations:
8484

8585
### Option 1: Enable on-the-fly (Specific Chat)
86-
While chatting, click the **➕ (plus)** icon in the input area. You’ll see a list of available Tools, and you can enable them specifically for that session.
86+
While chatting, click the **Integrations** icon in the input area (the four-diamond icon next to the ➕ button), then select **Tools**. You’ll see a list of available Tools, and you can toggle them on specifically for that session.
8787

8888
### Option 2: Enable by Default (Global/Model Level)
8989
1. Go to **Workspace ➡️ Models**.

docs/features/extensibility/plugin/tools/openapi-servers/open-webui.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ If you've connected a Global Tool Server (i.e., one that's admin-configured), it
151151
Instead:
152152

153153
- Global tools are hidden by default and must be explicitly activated per user.
154-
- To enable them, you'll need to click on the button in the message input area (bottom left of the chat box), and manually toggle on the specific global tool(s) you want to use.
154+
- To enable them, you'll need to click on the **Integrations** button in the message input area (bottom left of the chat box, next to the ➕ button), select **Tools**, and manually toggle on the specific global tool(s) you want to use.
155155

156156
Here's what that looks like:
157157

158158
![Global Tool Server Message Input](/images/openapi-servers/open-webui/global-message-input.png)
159159

160160
⚠️ Important Notes for Global Tool Servers:
161161

162-
- They will not show up in the tool indicator popup until enabled from the menu.
162+
- They will not show up in the tool indicator popup until enabled from the **Integrations** menu.
163163
- Each global tool must be individually toggled on to become active inside your current chat.
164164
- Once toggled on, they function the same way as user tools.
165165
- Admins can control access to global tools via role-based permissions.
-18.3 KB
Loading

0 commit comments

Comments
 (0)