Skip to content

docs: document OpenRouter TTS integration and response_format requirement - #1343

Merged
Classic298 merged 1 commit into
open-webui:mainfrom
bunnysayzz:docs/openrouter-tts-integration
Aug 7, 2026
Merged

docs: document OpenRouter TTS integration and response_format requirement#1343
Classic298 merged 1 commit into
open-webui:mainfrom
bunnysayzz:docs/openrouter-tts-integration

Conversation

@bunnysayzz

Copy link
Copy Markdown
Contributor

What

Documents how to use OpenRouter as a Text-to-Speech provider through Open WebUI's OpenAI-compatible TTS engine, resolving the 400 Bad Request reported in open-webui/open-webui#28143.

Why

OpenRouter's /audio/speech endpoint defaults response_format to pcm when omitted, and Open WebUI's _tts_openai handler (backend/open_webui/routers/audio.py) does not send response_format. The result is raw PCM audio that Open WebUI cannot play back → HTTP 400.

Changes

Adds a new "Using OpenRouter as a Text-to-Speech Provider" section to openai-tts-integration.md:

  • Why the 400 happens (OpenRouter defaults to pcm)
  • Quick Setup table: Base URL https://openrouter.ai/api/v1 + {"response_format": "mp3"} in OpenAI Params
  • Environment-variables variant using AUDIO_TTS_OPENAI_PARAMS (verified against config.py L1589)
  • Note that only mp3 is playable in Open WebUI (pcm is for streaming pipelines)

Testing

  • npx prettier --check passes on the modified file
  • All referenced env vars and the config key audio.tts.openai.params verified against the dev branch source

Closes #28143 (docs request)

…ment

Closes open-webui/open-webui#28143

Adds a dedicated section to the OpenAI TTS Integration guide covering:
- Configuring OpenRouter as a TTS provider via the OpenAI-compatible engine
- The AUDIO_TTS_OPENAI_PARAMS env var for docker-compose setups
- Why response_format must be set to mp3 (OpenRouter defaults to pcm,
  which Open WebUI cannot play back, causing a 400 Bad Request)
@Classic298

Copy link
Copy Markdown
Member

thanks!

@Classic298
Classic298 merged commit 2b3bd63 into open-webui:main Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants