AI voices stumble on "3:30pm", "$4.99", "12/01/2026", "Dr." and URLs, and re-generating audio to fix it wastes credits. tts-script-doctor is an open-source (MIT) Agent Skill with one Python script that lints a script for those risks, rewrites it into spoken form offline, splits long text into sentence-safe chunks, and can voice it with the Miragea speech API and verify the MP3 by transcribing it back.
Lint and fix (free, no API key)
git clone https://codeberg.org/miragea-voice/miragea-skills python3 miragea-skills/skills/tts-script-doctor/scripts/scriptdoctor.py fix script.txt Input: Dr. Rivera's workshop starts at 3:30pm on Nov 22, 2026. Tickets cost $4.99 (50% off until 12/01/2026), and the 2nd batch ships soon. Questions? Email hi@example.com.
Output: Doctor Rivera's workshop starts at three thirty P M on November twenty-second, twenty twenty-six. Tickets cost four dollars and ninety-nine cents (fifty percent off until December first, twenty twenty-six), and the second batch ships soon. Questions? Email hi at example dot com.
Add brand names with --lexicon lexicon.json ({"Miragea": "Mih-RAY-uh"}).
Voice it and check it
Create an API key at https://miragea.ai/workspace/api, export MIRAGEA_API_KEY, and run:
python3 miragea-skills/skills/tts-script-doctor/scripts/scriptdoctor.py speak script.txt --actor "My voice" -o out.mp3 --verify A 17 s MP3 came back, and speech recognition returned the original times, dates and prices. The files are in examples/tts-script-doctor.
Use it from an agent
Install the whole collection in Claude Code with /plugin marketplace add https://codeberg.org/miragea-voice/miragea-skills, or point any agent at the skill folder. For the Miragea skill itself: "Install https://miragea.ai/skills/miragea-audio/install.md".
FAQ
Why does text-to-speech read numbers wrong? Digits are ambiguous: 2026 can be a year or a quantity, 12/01 a date in two orders. Spelling them out removes the guess.
Does it need a GPU or a second LLM key? No. The rules are plain Python.

