SSML Markup Builder
Build and validate speech markup locally in your browser
About
Edit speech segments and inspect live SSML XML. Validation checks balanced tags, allowed attributes, say-as types, and break time formats entirely in your browser.
Examples
Prosody with escaped text
buildSsml([{ kind: "text", text: "Hello & welcome" }, { kind: "prosody", rate: "slow", pitch: "10%", text: "world" }])<speak>Hello & welcome<prosody rate="slow" pitch="10%">world</prosody></speak>Ampersands escape to & while prosody attributes serialize verbatim.
Break plus say-as
buildSsml([{ kind: "say-as", type: "cardinal", text: "42" }, { kind: "break", time: "500ms" }])<speak><say-as interpret-as="cardinal">42</say-as><break time="500ms"/></speak>Cardinal formatting pairs with a self-closing 500ms pause inside the speak root.
About this tool
SSML Markup Builder composes speech XML with buildSsml(segments): text, speak, prosody (rate/pitch/volume), break (time), emphasis (level), say-as (date/characters/cardinal/ordinal via interpret-as), and sub (alias) render into a <speak> root with XML-escaped text and attributes, and identical input always yields identical output.
Validation is two-layered: buildSsml flags bad segment values (malformed break time, unknown say-as type, invalid prosody value, missing sub alias), while validateSsml(xml) parses raw SSML for unbalanced or unclosed tags, unsupported tags, disallowed attributes, non-self-closing break, and a missing speak root.
Break times accept milliseconds, seconds (including decimals like 1.5s), or nanoseconds (e.g. 500ms, 1s, 1000000ns), and special characters (& < > " ') escape to entities automatically. Everything runs in the browser with no audio data uploaded.
How to use this tool
Add text and voice segments
Combine plain text with prosody, emphasis, say-as, sub, and self-closing break segments in order.
Set break and say-as values
Write break times as 500ms, 1.5s, or nanoseconds, and restrict say-as to date, characters, cardinal, or ordinal.
Build and validate
Check buildSsml findings for value errors, then run validateSsml on the XML to catch unbalanced tags.
Paste into your TTS voice
Copy the <speak> XML into a synthesizer that accepts SSML input.
Use cases
Drafting voice prompts
Assemble prosody, pauses, and substitutions before sending to a TTS service.
Linting pasted SSML
Catch unbalanced tags, bad break times, and wrong say-as types in existing markup.
Formatting spoken numbers
Control date, cardinal, ordinal, and character readout for IDs and measurements.
Common mistakes
Mistake:Writing break as an open/close pair or with hours.
Fix:break must be self-closing (<break time="500ms"/>) with ms, s, or ns units — 2h fails validation.
Mistake:Inventing say-as types like money or telephone.
Fix:Only date, characters, cardinal, and ordinal are accepted; anything else is an error.
Frequently asked questions
What does this tool do?
It composes speech XML with buildSsml (text, prosody, break, emphasis, say-as, sub inside a <speak> root) and lints raw markup with validateSsml, which catches unbalanced tags, bad break times, and wrong say-as types.
Which break and say-as values are valid?
Break times accept ms, s (decimals allowed), or ns — e.g. 500ms, 1.5s, 1000000ns — and must be self-closing. say-as allows only date, characters, cardinal, or ordinal.
Is my SSML uploaded or stored?
No. Building, escaping, and validation run entirely in your browser.
How are special characters handled?
Text and attribute values XML-escape automatically (& to &, < to <, quotes to entities), so pasted prose cannot break the markup.
Related guides
References & standards
Related tools
Agent Tool Flowchart Builder
Design agentic tool-call DAGs with decision branches and bounded loops. Validates reachability, cycle handling, and emits clean Mermaid flowcharts — fully in your browser.
AI Agent Memory & Buffer Simulator
Compare sliding window, summary buffer, and vector memory strategies
AI API Client SDK Generator
Generate typed API client SDK files from OpenAPI specifications or cURL requests
AI Code Explainer
Explain code snippets with grounded cloud AI
AI Code Security Auditor
Scan source code for high-confidence OWASP Top 10 vulnerabilities
AI Code Translator
Translate code into idiomatic implementations in another language