Converts Markdown-formatted text to TTS-friendly plain text while preserving structure
MarkdownTextFilter
transforms Markdown-formatted text into plain text that’s suitable for text-to-speech (TTS) systems. It intelligently removes formatting elements while preserving the content structure, including proper spacing and list formatting.
This filter is especially valuable for LLM-generated content, which often includes Markdown formatting that would sound unnatural if read aloud by a TTS system.
*italic*
, **bold**
, and other formatting markersMarkdown Feature | Example | Result |
---|---|---|
Bold | **important** | important |
Italic | *emphasized* | emphasized |
Headers | ## Section | Section |
Code (inline) | `code` | code |
Code blocks (when enabled) | ```python\ncode\n``` | |
Tables (when enabled) | |A|B|\n|--|--| | |
HTML tags | <em>text</em> | text |
Repeated characters | !!!!!!! | ! |