# multilingual tts segmentation

> Fix bilingual TTS errors by segmenting text, stripping markdown, and protecting quoted spans before synthesis.

multilingual tts segmentation is a free AI agent skill on Agensi by synergieloc, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [synergieloc](https://www.agensi.io/creators/synergieloc)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Uses: 3
- Version: 1.0
- Last updated: 2026-10-19
- Security: scan passed (2026-10-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/multilingual-tts-segmentation
- Tags: ai-agents, tts, multilingual, speech-synthesis, text-processing

## About this skill

Voice assistants and language tutors often mangle bilingual text by pronouncing Markdown syntax, misclassifying languages, or using the wrong accent for quoted phrases. This skill provides the logic and order of operations to correctly segment multilingual text before it reaches the synthesis engine.

### What it does
- **Markdown Stripping**: Removes asterisks and syntax server-side to prevent voices from literally saying "asterisk asterisk".
- **Protected Segmentation**: Ensures quoted spans remain unbreakable so punctuation inside quotes doesn't cause premature sentence splitting.
- **Phonetic Cleaning**: Identifies and removes hallucinated phonetic symbols (like /k/) that models invent but TTS engines misread.
- **Language Classification**: Applies refined rules for elisions and stop-words to prevent false language switching in multilingual voices.
- **Silence Injection**: Logic for joining synthesized segments with specific timing to prevent audible "hard cuts" between voices.

### How it works
1. **Pre-process**: Strip all markdown and pseudo-phonetic slashes from the model output.
2. **Segment**: Split the text into sentences while treating quoted spans as atomic, unbreakable units.
3. **Classify & Merge**: Identify the language of each chunk and merge adjacent chunks of the same language.
4. **Clean & Synthesize**: Drop chunks containing no alphanumeric characters and send remaining segments to their respective voices.

### Frameworks & tools
The skill provides logic applicable to any TTS pipeline (Azure Neural, AWS Polly, OpenAI Audio) and includes `scripts/measure_voice.js` for duration-based defect testing.

### Why this beats prompting it yourself
Prompting a model to "not use markdown" is not a guarantee, as models frequently ignore these constraints in edge cases. This skill implements the server-side safety nets and segmentation logic required to fix defects that prompts alone cannot resolve.

### Use cases
- Building a language tutor that switches between a native and target language.
- Developing a bilingual assistant that quotes foreign text without changing accents.
- Fixing "stuttering" or "spelling out" behaviors in production TTS systems.

### Known limitations
Does not include voice cloning or model training logic. The phonetic slash removal is narrowly scoped to avoid breaking dates or "and/or" constructions.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the multilingual tts segmentation skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill improve my existing text-to-speech output?

This skill acts as a pre-processing middleware that cleans and segments text before it reaches your TTS engine, specifically fixing issues like voices reading markdown syntax or using the wrong accent for foreign quotes.

### Can I use this skill with any TTS provider?

Yes, the logic is engine-agnostic and designed to work with any API-based synthesis tool, including Azure Neural, AWS Polly, OpenAI Audio, and ElevenLabs.

### What specific assets are included in this purchase?

You will receive the core segmentation and cleaning logic, the specific order of operations for multilingual handling, and the `scripts/measure_voice.js` tool for testing audio duration defects.

### Why shouldn't I just prompt my LLM to avoid markdown and formatting?

While prompts often fail in edge cases, this skill provides a server-side safety net that programmatically strips markdown and protects quoted text, ensuring 100% consistency that prompting alone cannot guarantee.

### How does the skill handle transitions between two different languages in one sentence?

The skill is designed to handle common bilingual scenarios, such as language tutors or assistants, by using refined rules for elisions and stop-words to prevent incorrect language switching.

### Does this skill include any custom voice models or cloning features?

It does not include voice cloning or model training; it is strictly focused on the text-processing and segmentation logic required to optimize existing voices.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
