[GH-ISSUE #13775] feat: Abiility to Filter Text before its sent for TTS Synthesis #17027

Closed
opened 2026-04-19 22:48:39 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @digitalassassins on GitHub (May 11, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13775

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Im not sure if this is available as I can't find anything anywhere in the docs, and searching the codebase.

I've tried all the TTS options. Ive used the built-in Microsoft Voices (Legacy & Natural) by installing the Natural Voices SAPI Adapter. TTS-1, TTS-1-HD, kokoro.js, Kokoro-Fast, openedai-speech

They all seem to have the same speech synthesis issues.

The built-in Microsoft Natural voices in Windows sound great and use fewer resources, but they read all the markdown. The same on Google with the built-in TTS on Android. The Following bit of Text:

  • Modify streaming.
  • Implement censorship.
  • Monitor data

is read out aloud by the TTS in words as:

"asterisk asterisk asterisk asterisk asterisk Modify asterisk asterisk Streaming.
asterisk asterisk asterisk Implement asterisk asterisk Censorship asterisk asterisk.
asterisk asterisk asterisk asterisk asterisk Monitor asterisk asterisk Data."

which is extremely annoying, switching to kokoro.js fixes the issue, but then crashes my account on an Android device. Switching to Kokoro-Fast, openedai-speech, TTS-1, TTS-1-HD. fixes this on Android but then all the TTS models struggle with this, to name but a few:

AI is read out as "Eye"
Weblinks (https://www.google.com/blog) are read out as:
"His is pes , woo woo wee , dot google dot com forward slash blog" etc..

I've tried filtering the streaming data before it hits the page, which works. But then the writing becomes unreadable in the chat window. I tried filtering the end chat result after it was written to the page. But it does nothing.

If this filter is already available, could somebody point me in the direction of where python sends the text from the chat to be synthesised?

Desired Solution you'd like

Would like the ability to write a filter for the text before it's sent to the TTS for synthesis. so we could strip the markdown and any misgivings we find in the TTS. We could filter out and replace using .replace or regex.

This would allow us to filter characters like * \ [ ] , as it seems counterintuitive to send page markdown to the TTS
we could replace "https://www." as "Weblink:" so the TTS said:
Weblink: google dot com forward slash blog
Instead of:
"His is pes , woo woo wee , dot google dot com forward slash blog"

Alternatives Considered

No response

Additional Context

No response

Originally created by @digitalassassins on GitHub (May 11, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/13775 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description Im not sure if this is available as I can't find anything anywhere in the docs, and searching the codebase. I've tried all the TTS options. Ive used the built-in Microsoft Voices (Legacy & Natural) by installing the Natural Voices SAPI Adapter. TTS-1, TTS-1-HD, kokoro.js, Kokoro-Fast, openedai-speech They all seem to have the same speech synthesis issues. The built-in Microsoft Natural voices in Windows sound great and use fewer resources, but they read all the markdown. The same on Google with the built-in TTS on Android. The Following bit of Text: - **Modify** streaming. - Implement **censorship**. - **Monitor** data is read out aloud by the TTS in words as: _"asterisk asterisk asterisk asterisk asterisk Modify asterisk asterisk Streaming. asterisk asterisk asterisk Implement asterisk asterisk Censorship asterisk asterisk. asterisk asterisk asterisk asterisk asterisk Monitor asterisk asterisk Data."_ which is extremely annoying, switching to kokoro.js fixes the issue, but then crashes my account on an Android device. Switching to Kokoro-Fast, openedai-speech, TTS-1, TTS-1-HD. fixes this on Android but then all the TTS models struggle with this, to name but a few: **AI** is read out as _"Eye"_ Weblinks (https://www.google.com/blog) are read out as: _"His is pes , woo woo wee , dot google dot com forward slash blog"_ etc.. I've tried filtering the streaming data before it hits the page, which works. But then the writing becomes unreadable in the chat window. I tried filtering the end chat result after it was written to the page. But it does nothing. If this filter is already available, could somebody point me in the direction of where python sends the text from the chat to be synthesised? ### Desired Solution you'd like Would like the ability to write a filter for the text before it's sent to the TTS for synthesis. so we could strip the markdown and any misgivings we find in the TTS. We could filter out and replace using .replace or regex. This would allow us to filter characters like * \ [ ] , as it seems counterintuitive to send page markdown to the TTS we could replace "https://www." as "Weblink:" so the TTS said: _Weblink: google dot com forward slash blog_ Instead of: _"His is pes , woo woo wee , dot google dot com forward slash blog"_ ### Alternatives Considered _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#17027