mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
issue: Azure TTS fails on ampersand in SSML: 400 “Invalid char ‘&’ …” #6561
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?
Originally created by @rbb-dev on GitHub (Oct 1, 2025).
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.6.32
Ollama Version (if applicable)
No response
Operating System
Ubuntu 24.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Clicking the speaker icon should generate audio for any plain text, including text containing special characters like ‘&’.
Open WebUI should escape SSML‑sensitive characters before sending the payload to Azure Cognitive Services, so the request succeeds and audio plays.
Actual Behavior
Azure TTS returns HTTP 400 with “Invalid char ‘&’ … found in SSML. Please escape it before use.” when the input contains an ampersand.
No audio is produced for that section of text. Server logs show a stack trace from open_webui/routers/audio.py around the TTS request.
Steps to Reproduce
Configure Text‑to‑Speech provider as Azure Cognitive Services.
In any chat, click the speaker icon to play TTS for a message that contains an ampersand, for example:
“Fish & chips for dinner.”
“R&D update for A&B.”
Watch the server logs while TTS starts. You will see HTTP 400 errors from the Azure endpoint and a stack trace.
Audio does not play.
if the text section is large and punctuation splitting is used, part of audio is missing
Logs & Screenshots
Additional Information
No response
@tjbck commented on GitHub (Oct 2, 2025):
2e75c6dbdfin dev!