[GH-ISSUE #5560] enh: option to disable TTS removeFormattings #29560

Closed
opened 2026-04-25 03:55:44 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @bergutman on GitHub (Sep 20, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5560

Installation Method

I forked the latest official helm chart to support v0.3.22 and deployed Open-WebUI to my Kubernetes cluster.

Environment

  • Open WebUI Version: v0.3.22

Confirmation:

  • [ ] I have read and followed all the instructions provided in the README.md.
  • [ ] I am on the latest version of both Open WebUI and Ollama.
  • [ ] I have included the browser console logs.
  • [ ] I have included the Docker container logs.
  • [ ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Azure TTS should read content that is italicized.

Actual Behavior:

Azure TTS skips over content that is italicized.

Description

Bug Summary:
The latest update to Open-WebUI added native Azure TTS support, which mostly works great—thank you! However, italicized content is not included in the array sent to Azure. I suspect it might be related to the asterisk (*) character causing a regex issue or something. Other formatting, like bold or quoted text, works fine.

Reproduction Details

Install v0.3.22 and generate audio for text containing italicized content.

Specific Azure TTS settings:
Voice: en-US-AvaNeural
Server: eastus
Output Format: audio-24khz-160kbitrate-mono-mp3
Response Splitting: Punctuation / Paragraph / None (doesn't matter)

Steps to Reproduce:

Ask any model to generate text containing italicized content (IE: Test 1 "Test 2" Test 3 Test 4 ) and click the read aloud button.

Logs and Screenshots

Given the following text:
Test 1 "Test 2" *Test 3* **Test 4**

Browser Console Logs:
Prepared message content for TTS
Array [ 'Test 1 "Test 2" test 4' ]
ResponseMessage.svelte:176:11

Docker Container Logs:
INFO: REDACTED:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: REDACTED:0 - "POST /audio/api/v1/speech HTTP/1.1" 200 OK

Screenshots/Screen Recordings (if applicable):

https://github.com/user-attachments/assets/829da1c8-9a60-4887-9119-ec5d421d64ee

Additional Information

I can verify that this bug is not occurring on Azure's end. From the Azure voice gallery you can test out sample text and it is able to read aloud content wrapped in asterisks.

Originally created by @bergutman on GitHub (Sep 20, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/5560 ## Installation Method I forked the latest official helm chart to support v0.3.22 and deployed Open-WebUI to my Kubernetes cluster. ## Environment - **Open WebUI Version:** v0.3.22 **Confirmation:** - [✅ ] I have read and followed all the instructions provided in the README.md. - [ ✅] I am on the latest version of both Open WebUI and Ollama. - [ ✅] I have included the browser console logs. - [ ✅] I have included the Docker container logs. - [ ✅] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Azure TTS should read content that is italicized. ## Actual Behavior: Azure TTS skips over content that is italicized. ## Description **Bug Summary:** The latest update to Open-WebUI added native Azure TTS support, which mostly works great—thank you! However, italicized content is not included in the array sent to Azure. I suspect it might be related to the asterisk (*) character causing a regex issue or something. Other formatting, like bold or quoted text, works fine. ## Reproduction Details Install v0.3.22 and generate audio for text containing italicized content. **Specific Azure TTS settings:** Voice: en-US-AvaNeural Server: eastus Output Format: audio-24khz-160kbitrate-mono-mp3 Response Splitting: Punctuation / Paragraph / None (doesn't matter) **Steps to Reproduce:** Ask any model to generate text containing italicized content (IE: Test 1 "Test 2" *Test 3* **Test 4** ) and click the read aloud button. ## Logs and Screenshots Given the following text: `Test 1 "Test 2" *Test 3* **Test 4**` **Browser Console Logs:** Prepared message content for TTS Array [ 'Test 1 "Test 2" test 4' ] ResponseMessage.svelte:176:11 **Docker Container Logs:** INFO: REDACTED:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK INFO: REDACTED:0 - "POST /audio/api/v1/speech HTTP/1.1" 200 OK **Screenshots/Screen Recordings (if applicable):** https://github.com/user-attachments/assets/829da1c8-9a60-4887-9119-ec5d421d64ee ## Additional Information I can verify that this bug is not occurring on Azure's end. From the [Azure voice gallery](https://speech.microsoft.com/portal/voicegallery) you can test out sample text and it is able to read aloud content wrapped in asterisks.
Author
Owner

@iamtheezac commented on GitHub (Sep 26, 2024):

GitHub Comment Draft

Hi, I'm experiencing the same issue as described above with italicized text being skipped during TTS playback. Here are my specific details:

Installation Method:

  • Docker-Compose, running the latest ollama image.

Environment:

  • Open-WebUI Version: v0.3.12
  • TTS Engine: https://api.openai.com/v1
  • TTS Voice: fable
  • TTS Model: tts-1
  • Browser: Google Chrome Canary

Steps to Reproduce:

  1. Input text with a mix of regular, quoted, and italicized formatting.
  2. Trigger the TTS engine to read the text aloud.
  3. Italicized words are skipped during playback.

Example Text:

test 1
"test 2"
*test 3*
**test 4**

When played back, the engine skips over *test 3*, while the rest of the text is read correctly.

Logs:
Here's a condensed version of my Docker logs:

2024/09/25 18:26:38 routes.go:1153: INFO server config env="map[...] OLLAMA_HOST:http://0.0.0.0:11434 [...] OLLAMA_MODELS:/root/.ollama/models"
time=2024-09-25T18:26:38.529Z level=INFO source=routes.go:1200 msg="Listening on [::]:11434 (version 0.3.12)"
time=2024-09-25T18:26:38.532Z level=ERROR source=amd_linux.go:364 msg="amdgpu devices detected but permission problems block access"
time=2024-09-26 - 09:04:15 | 200 |      62.086µs | 172.19.0.3 | GET "/api/version"

I've also recorded a .mov file where I tested various formatting, which is attached.

https://github.com/user-attachments/assets/fcf59f23-378f-451b-86c7-3d710b7c2da1

<!-- gh-comment-id:2376444982 --> @iamtheezac commented on GitHub (Sep 26, 2024): ### GitHub Comment Draft Hi, I'm experiencing the same issue as described above with italicized text being skipped during TTS playback. Here are my specific details: **Installation Method:** - Docker-Compose, running the latest `ollama` image. **Environment:** - Open-WebUI Version: v0.3.12 - TTS Engine: https://api.openai.com/v1 - TTS Voice: fable - TTS Model: tts-1 - Browser: Google Chrome Canary **Steps to Reproduce:** 1. Input text with a mix of regular, quoted, and italicized formatting. 2. Trigger the TTS engine to read the text aloud. 3. Italicized words are skipped during playback. **Example Text:** ``` test 1 "test 2" *test 3* **test 4** ``` When played back, the engine skips over `*test 3*`, while the rest of the text is read correctly. **Logs:** Here's a condensed version of my Docker logs: ``` 2024/09/25 18:26:38 routes.go:1153: INFO server config env="map[...] OLLAMA_HOST:http://0.0.0.0:11434 [...] OLLAMA_MODELS:/root/.ollama/models" time=2024-09-25T18:26:38.529Z level=INFO source=routes.go:1200 msg="Listening on [::]:11434 (version 0.3.12)" time=2024-09-25T18:26:38.532Z level=ERROR source=amd_linux.go:364 msg="amdgpu devices detected but permission problems block access" time=2024-09-26 - 09:04:15 | 200 | 62.086µs | 172.19.0.3 | GET "/api/version" ``` I've also recorded a `.mov` file where I tested various formatting, which is attached. https://github.com/user-attachments/assets/fcf59f23-378f-451b-86c7-3d710b7c2da1
Author
Owner

@denispol commented on GitHub (Dec 18, 2024):

Fixed by #7919

<!-- gh-comment-id:2550615152 --> @denispol commented on GitHub (Dec 18, 2024): Fixed by #7919
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#29560