phoneticize
Skill9 starsChanged 6 months agoISCView on GitHub
Build pronunciation tables, generate text-to-speech (TTS) preview samples, and produce phoneticized scripts ready for narration. Use whenever a script is intended for text-to-speech rendering and the user wants to catch words the engine will mispronounce — proper nouns, Gaelic and Welsh names, brand names with idiosyncratic pronunciation (df12, Nginx), model names with embedded numerics (Atari 2600, ESP32), terms of art and acronyms (SaaS, OAuth, JWT), and document specifiers (ADR-0012, RFC 2119). Trigger on phrases like "phoneticize this script", "phonetecize this", "phonetize", "prep this for TTS", "build a pronunciation table", or any task involving text-to-speech narration where pronunciation consistency matters across takes. Drives a phased workflow: detect candidates, suggest phonetic respellings, render preview samples via the Higgsfield MCP TTS tool with Eleven v3, iterate with the user, and emit a final phoneticized script.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- kling-3-0-deep-diveSkill
- media-projectSkill
- nanobananaSkill
- scene-inventory-extractorSkill
- seedance-2-deep-diveSkill
- shot-specifierSkill
- video-generatorSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Render once, accept once: Never re-render an accepted row — it wastes Higgsfield calls and the user will assume something broke when the …
- Distinctive: line 79
Read the script. For every candidate the helper found:
- Distinctive: line 105
Positions: every offset where the lemma occurs in the script
- Distinctive: line 146
If the Higgsfield TTS tool has not already been located, search:
- Very specific: line 152
If nothing matches, surface the gap to the user via suggest_connectors and pause until the connection is in place.
- Very specific: line 162
Call the TTS tool with the fragment, requesting eleven_v3 (or whatever string the tool exposes for the v3 model)
- Distinctive: line 204
Every occurrence of every accepted token's lemma → respelling
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Phoneticize — TTS pronunciation prep
A workflow for identifying pronunciation hazards in a TTS script, agreeing phonetic renderings with the user via audio previews, and emitting a phoneticized script ready for narration.
Read first
| Reference | When to read | Path |
| Detection heuristics | Before Phase 1 — patterns that find candidates and how to combine them | references/detection-heuristics.md |
| Respelling conventions | Before Phase 2 — how to write phonetic respellings that Eleven v3 actually obeys | references/respelling-conventions.md |
| Eleven v3 format notes | Before Phase 3 and Phase 5 — what the engine accepts and silently ignores | references/eleven-v3-notes.md |
Governing principles
- Preview the fragment, not the word. TTS prosody depends on surrounding context. A respelling that sounds right in isolation collapses inside a sentence. Render fragments throughout.
- Respelling is the primary output, not SSML. Eleven v3 silently
drops
<phoneme>tags (seereferences/eleven-v3-notes.md). Inline respelling —Siobhán→shi-VAWNdirectly in the prose — is what actually changes the model's output. IPA goes in the table for archival precision; respelling goes in the script. - Mark uncertainty, never guess. A wrong respelling shipped with
confidence is worse than an explicit
?the user resolves. When the pronunciation isn't obvious, ask. - Stable IDs across iterations. Each candidate gets a row ID
(
P01,P02, …) on first pass and keeps it for the lifetime of the table. The user references rows by ID; regenerate only the rows that changed. - Render once, accept once. Never re-render an
acceptedrow — it wastes Higgsfield calls and the user will assume something broke when the audio differs subtly between takes.
Phase 1 — Scan
Combine the regex helper with semantic reading. Neither alone catches everything: regex misses ordinary-looking words with non-obvious pronunciation (Worcester, Featherstonehaugh), and an LLM scan alone will miss tokens deep in long scripts.
Run the helper
python scripts/extract_candidates.py path/to/script.txt --out candidates.jsonThe helper applies the patterns documented in
references/detection-heuristics.md and emits a JSON list of
deduplicated candidates with category guesses, positions, and context
fragments.
Add and prune
Read the script. For every candidate the helper found:
- Confirm the category — the helper guesses from token shape and occasionally gets it wrong (a CamelCase brand name miscategorised as ART, etc.)
- Drop false positives — title-case words at sentence-initial positions that aren't actually proper nouns, common acronyms the user clearly already pronounces a particular way
For everything the helper missed:
- English place names with silent letters (Worcester, Cholmondeley, Featherstonehaugh)
- Loanwords with retained pronunciation (lingerie, pho, façade)
- Programmer jargon with contested pronunciation (Nginx, kubectl, YAML, GIF)
- Multi-token model names — the helper catches
Atariand2600separately; merge them by hand into a single candidateAtari 2600
Capture per candidate
For each entry, the table needs:
- Token: surface form as it appears (preserve case)
- Lemma: canonical form for deduping (
Siobhán's→Siobhán) - Category:
NAM/CEL/BRA/MOD/ART/DOC/OTH - Positions: every offset where the lemma occurs in the script
- Original fragment: 5–6 word snippet around the first occurrence, snapped to clause boundaries where possible
Phase 2 — Suggest respellings
Build the pronunciation table in this exact column order:
| Col | Meaning |
ID | Stable identifier — P01, P02, … |
Token | The token as it appears in the script |
Cat | NAM / CEL / BRA / MOD / ART / DOC / OTH |
Original fragment | 5–6 word snippet, original spelling |
Respelling | Editable phonetic respelling — see conventions |
IPA | Archive form (optional; fill where confident) |
Phoneticized fragment | Same fragment with the respelling substituted in situ |
Sample | Path to rendered audio (filled in Phase 3) |
Status | pending / accepted / revised |
Respelling rules (full detail in references/respelling-conventions.md):
- Hyphens between syllables:
shi-VAWN, nevershivawn - Capitals mark stress:
shi-VAWN(stress on second),LLAN-fair(stress on first) - English orthographic conventions, not IPA:
oofor /uː/,ayfor /eɪ/,awfor /ɔː/. The model reads letters, not symbols. - Disambiguate hard consonants:
katnotcatif the model is reading the c soft;gohlnotgoalif the g is going wrong - Acronyms — letter or word: decide and commit.
S-Q-L(letters) orSEE-kwul(word) — both are valid; pick one and tell the user. - Numerics — write them out:
Atari 2600→Atari twenty-six hundred;ADR-0012→A-D-R twelve. Lose leading zeros when speaking.
Mark uncertain rows ? in the Respelling column. Don't fabricate.
Phase 3 — Render samples
Find the tool
If the Higgsfield TTS tool has not already been located, search:
tool_search keywords=["tts", "speech", "higgsfield", "eleven"]If nothing matches, surface the gap to the user via
suggest_connectors and pause until the connection is in place.
Render fragments, not words
For each row with status pending:
- Take the phoneticized fragment (not the isolated word — context matters for prosody; syllable boundaries must land in surrounding speech to be correctly evaluated)
- Call the TTS tool with the fragment, requesting
eleven_v3(or whatever string the tool exposes for the v3 model) - Save the audio to
samples/<ID>_<lemma_slug>.mp3— e.g.samples/P01_siobhan.mp3 - Fill the
Samplecolumn with the relative path
Render in sequence, not in parallel. Higgsfield rate limits, and sequential rendering gives the user deterministic ordering for review.
Present and pause
Present the table with samples linked. Communicate the expected response shape to the user (acceptance, revision, rejection, addition — see Phase 4). Then wait. Do not proceed to Phase 5 without explicit sign-off.
Phase 4 — Iterate
The user's response will mix four kinds of update:
| Form | Example | Action |
| Acceptance | "P01, P03, P04 are good" | Mark those rows accepted. |
| Revision | "P02 should be 'dee-eff-TWELVE' not 'DEE-eff-twelve'" | Update Respelling and Phoneticized fragment, mark revised, queue for re-render. |
| Rejection | "drop P05, that pronunciation's fine as-is" | Remove the row entirely; the substitution won't happen in Phase 5. |
| Addition | "you missed 'Llanelli' in para 3" | Add a new row with the next free ID, mark pending, render in the next batch. |
Re-render only revised and newly-added pending rows. Never
re-render accepted rows.
Loop until every remaining row is accepted. When the user signs off,
proceed to Phase 5.
Phase 5 — Emit phoneticized script
Primary output: script.respelled.txt
The original script with respellings substituted inline. This is the deliverable that goes into Eleven v3.
Substitution rules:
- Every occurrence of every accepted token's lemma → respelling
- Possessives and inflections handled at the surface form, preserving the
apostrophe in possessive output as shown in
skills/phoneticize/references/respelling-conventions.mdlines 133-136:Siobhán's→shi-VAWN's;df12's→dee-eff-TWELVE's - Sentence-initial capitalization preserved:
Siobhán arrived→Shi-VAWN arrived(capitalize the first letter, keep the stress capitals where they were) - Punctuation preserved exactly
- Multi-occurrence consistency: same lemma → same respelling, every time
Secondary output: script.ssml.xml
For engines that honour <phoneme> tags — Azure TTS, AWS Polly,
Google Cloud TTS, older Eleven models. Wrap each substituted token in
SSML using the IPA column:
I met <phoneme alphabet="ipa" ph="ʃɪˈvɔːn">Siobhán</phoneme> at the bar.Skip rows where IPA is empty — emit the bare token, not a malformed tag. The SSML version is best-effort archival; the primary respelling is what the user actually narrates from.
Archive: pronunciation_table.md
The final agreed table, saved alongside the scripts. When the user
re-narrates the same content months later, the table lets them
reproduce the voicing without re-running Phase 3. Suggest exporting
the table as an ElevenLabs PLS alias dictionary too — see
references/eleven-v3-notes.md for format.
Output bundle
Final deliverables, presented via present_files:
output/
├── script.respelled.txt ← primary: feeds into Eleven v3
├── script.ssml.xml ← secondary: for SSML-aware engines
├── pronunciation_table.md ← archive of the agreed table
└── samples/
├── P01_siobhan.mp3
├── P02_df12.mp3
└── ...List script.respelled.txt first in the present_files call — that's
the deliverable the user will reach for most often.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

