{"uid":"cap_B7iJhbZ0a1xYUvjcNm4lW","slug":"writerslogic-pronunciation-lexicon-apply-f50fc53b","name":"WritersLogic Pronunciation Lexicon Apply","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/pronunciation-apply?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"lang":{"type":"string","maxLength":16,"description":"xml:lang of the speak element (default en-US)."},"text":{"type":"string","maxLength":20000,"minLength":1},"lexicon":{"type":"array","items":{"type":"object","required":["term"],"properties":{"ipa":{"type":"string","maxLength":200,"description":"IPA transcription; becomes <phoneme alphabet=\"ipa\" ph=...>."},"term":{"type":"string","maxLength":100,"minLength":1},"alias":{"type":"string","maxLength":200,"description":"Spoken form; becomes <sub alias=...>."},"caseSensitive":{"type":"boolean","description":"Default false."}}},"maxItems":200,"minItems":1},"wrapSpeak":{"type":"boolean","description":"Wrap in <speak version=\"1.1\"> (default true)."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_btUFsd7gPjGD8W9aL0SIM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Applies a custom pronunciation lexicon to input text and returns SSML 1.1 markup with IPA phoneme or alias substitution tags for text-to-speech engines","exampleAgentPrompt":"Apply my pronunciation lexicon to this 500-word product announcement and return SSML 1.1: map 'AWS' to the alias 'Amazon Web Services', 'SQL' to the alias 'sequel', and 'Kubernetes' to IPA 'kjuːbərˈnɛtɪz' — wrap the whole thing in a speak element with lang set to en-US.","exampleUseCases":[{"title":"Brand name TTS standardization","prompt":"I have a script for our voice assistant that mentions brand names like 'Xiaomi', 'Nuance', and 'GitHub' — apply my lexicon to it and return SSML so the TTS engine pronounces them correctly. Use IPA for Xiaomi ('ʃjaˈomi') and spoken aliases for the others, with en-US as the language."},{"title":"Medical terminology voice prep","prompt":"Before I send this patient summary to our TTS system, apply my medical pronunciation lexicon to it — terms like 'tachycardia', 'dyspnea', and 'myocardial' each have IPA entries I'll provide. Return SSML 1.1 wrapped in a speak element with lang en-US."},{"title":"Podcast script phoneme markup","prompt":"I'm producing a podcast episode script about physics — can you apply my pronunciation lexicon to the full 8000-character script? Map 'Feynman' to the alias 'Fine-man' and 'Bose-Einstein' to its IPA form, and give me back the full SSML so I can feed it to our speech engine."}],"resultDescription":"Returns an SSML 1.1 document (optionally wrapped in a <speak version='1.1'> element with the specified xml:lang) where each matched term from the lexicon is surrounded by either a <phoneme alphabet='ipa' ph='...'> tag (for IPA entries) or a <sub alias='...'> tag (for spoken alias entries). Matching is whole-word, longest-match-first, left-to-right, and XML-escaped. Terms not in the lexicon are passed through as plain text.","failureModes":["Text exceeds 20000 characters — request rejected","Lexicon contains more than 200 entries — request rejected","IPA string contains characters outside the accepted IPA Unicode range — validation error returned","Term missing required 'term' field — schema validation error","Input text is empty (minLength 1 violated) — rejected","TTS vendor does not support the returned SSML tags — not detected by this endpoint, silent downstream failure","No terms from lexicon match any words in the text — SSML returned with no phoneme/sub tags applied"],"whenToPreferThis":"Use this endpoint when an AI agent is preparing text for a text-to-speech engine and needs deterministic, whole-word SSML pronunciation markup applied from a known lexicon — especially for domain-specific terms (brand names, medical or technical vocabulary, proper nouns) where the TTS engine's default pronunciation is incorrect. Prefer it over manual SSML authoring when the lexicon has up to 200 terms and the text is up to 20,000 characters. Do not use it to auto-generate pronunciations for unknown words, convert between phonetic alphabets, or validate TTS engine compatibility.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:39:04.122Z","isFirstParty":false,"canonicalSlug":"writerslogic-pronunciation-lexicon-apply-f50fc53b"}