by aligh98
Agent skill that directs scripts for TTS (ElevenLabs v3/v4 tags): rewrite for the ear, tag budget, free linter, A/B tester. | اسکیلی برای کارگردانی متن قبل از TTS: بازنویسی برای گوش، تگگذاری بدون زیادهروی، لینتر رایگان و تست A/B. فارسیمحور.
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
# Add to your Claude Code skills
git clone https://github.com/aligh98/tts-directorGuides for using ai agents skills like tts-director.
A great voiceover is about 80% text and 20% tags. The text sets the rhythm, the register and where the energy goes. Tags only push a delivery the text has already set up. A script with a tag on every line sounds like an over-acted ad and loses the viewer. A script with none often sounds read.
This skill does not replace your TTS pipeline. It prepares the text that goes into it. Scripts are stdlib Python 3.9+; ffmpeg/ffprobe are optional and give durations.
Do the steps in order. The tools check them, so none can be skipped silently:
tag_lint.py gives an ERROR when a line has no beat label;tag_lint.py --check-approved fails until the person has approved the exact text. Gate your TTS call on it.Before step 1, read the delivery reference for the script's language (references/persian-delivery.md or references/english-delivery.md) and references/audio-tags.md. The linter checks only part of them.
Beat map, inside the script. End every spoken line with « # ROLE ENERGY» (energy 1–5):
[excited] Wait, this ends Friday... and it's not coming back! # HOOK 5
[whispers] Here's the trick... # TIP 2
The roles are:
Plan the arc before touching words. See Viral arc. Strip the labels before the text goes to the TTS: tag_lint.strip_beats(text) does it, or remove everything from « #» to the end of each line. For a script that is not a short-form video, pass --no-beats.
Rewrite for the ear. Keep the meaning and every fact. Rewriting means:
For Persian, follow the alef rule in persian-delivery.md: the voice reads every «ا» as a long «آ», and a short /a/ is a fatha only. Some words are spelled unlike they sound («بالاخره»، «حتی»، «فوقالعاده»; see references/fa-traps.tsv). Treat a respelling as a guess until a human confirms it by ear; mark confirmed rows in your lexicon with a note that starts with «✓».
Tag pass. Tag only the beats the text alone cannot carry, within the Tag budget. For tag names and what each one is for, see references/audio-tags.md.
Lint (free):
python scripts/tag_lint.py SCRIPT --model eleven_v4 --tempo 1.15 [--lexicon words.tsv] [--ab-budget 160]
It prints the beat map with estimated times, then checks:
{written|spoken} overrides that do the same;Fix every ERROR. Keep a WARN only when you can say why. The A/B PLAN at the end lists the lines to test, in priority order, with their cost; see A/B priority.
Approval. Show the person the full text with its beat map and the A/B plan. Generating audio costs them credits, and the wording is theirs to approve. After their OK:
python scripts/tag_lint.py SCRIPT --approve
This writes SCRIPT.approved.json, the SHA-256 of the stripped file text. --approve refuses while there is an ERROR. Before every TTS call, run tag_lint.py SCRIPT --check-approved: exit 0 means approved, exit 3 means no stamp or a changed text. Any edit needs a new OK. A pipeline can also compare the hash itself: sha256(file_text.strip()). Choosing an A/B take does not approve the whole text.
A/B the risky lines in the A/B plan's order. Check the cost first; --dry-run sends nothing:
python scripts/ab.py "VARIANT A" "VARIANT B" --voice VOICE_ID --stability 0.35 --stability 0.5 --prev "line before" --next "line after" --out probe/ab --dry-run
Remove --dry-run to generate. Every clip uses the same --seed, so the differences come from the text and the settings, not from chance. Each clip is transcribed:
LEAK means a tag was read aloud as a word. Drop or rephrase that tag.[laughter] or [خنده] means the sound was performed.LISTEN FOR (Persian) names the words whose reading is unconfirmed.Speech-to-text cannot judge excitement or vowel length, so let a human ear pick the winner. If the chosen take changes the text, lint and approve again.
Generate the full script with the chosen variants and settings, after --check-approved passes. Then:
ffmpeg -af atempo=1.1 (1.10–1.20 keeps pitch), not with a speed setting. If you have word timings, divide them by the same factor.previous_text/next_text and splice it in.Never over-tag. Every tag must help retention or make the voice more human. A tag that repeats what the text already says is noise.
Density: about 1 tag per 3–4 sentences, which is 4–8 tags in a 60–90 s reel. The linter errors above 0.5 tags per sentence and warns above 0.34.
Baseline energy is not a tag. The voice, a stability of 0.3–0.4 and punchy text set the overall energy. Do not put [excited] on every line. Save it for 2–3 peaks: the hook, the big reveal and the CTA push.
Laughs: 0 to 2 per reel, and never forced. Laugh only where a person would:
Never laugh on numbers, dates, prices, the offer itself or the CTA keyword. Keep laughs 20 s or more apart. Pick the tag by size: [chuckles] is the safe, light one; [laughs] is a clear laugh; use [laughs harder] for one big moment at most.
Contrast beats intensity. Attention comes from change. Use one change of delivery every 8–12 s; this is the pattern interrupt. For example:
One or two tags at a spot, never three. Put the tag right before the words it colours. Its effect runs to about the end of that sentence.
Bring the energy back after [whispers] or [sighs]. Do it on the next line with the text (a «!», a short punch) or with a delivery tag. Check it by ear.
Keep clarity lines clean. Numbers, dates, prices, product names and the CTA keyword are said plainly. A warm tag may come before the CTA sentence, never inside the keyword.
Never tag staging or music ([music], [standing]), and never tag sensitive topics such as grief, illness or tragedy.
Test credits are often limited. Spend them in this order; the linter's A/B PLAN lists the lines the same way, and --ab-budget N marks what fits:
--prev set to the low line. Does the voice come back up?When a line does not fit, shorten the clip to the risky words alone; --prev/--next give the context and are not spoken. Never skip a level-1 or level-2 item to test a lower one. Tell the person what was not tested.
For a 60–90 s vertical video:
| Time | Beat | Energy | Typical device |
|---|---|---|---|
| 0–3 s | HOOK | 5 | Urgency or curiosity in the first words: an interjection, a bold claim, a question, [gasps] or [excited]. No greeting. |
| 3–10 s | SETUP | 4 | Why it matters now: a deadline, or what they lose if they skip it. Short and fast. |
| every 8–12 s | INTERRUPT | ± | A change of delivery: a whisper, a sigh, a chuckle, a «...» pause, a rhetorical question. |
| list | ITEM | 4 | A punchy numbered title, then one line of reason. Don't tag every item, and vary the openers. |
| ~70% | TIP | 3, intimate | [whispers] plus "here's the trick...", then back up. Lower energy here reads as a secret and lifts retention. |
| end | CTA | 4, warm | Clear and friendly, with the keyword said unhurried. A smile in the voice; one light tag at most. |
For long-form narration (an audiobook, an explainer), halve the tag budget and drop the pattern-interrupt rule. Let the text carry it.
stability and similarity_boost; its help page says Style and Speed are not available. A test on 2026-11-03 confirmed this: speed 0.8 and 1.2 gave clips of 6.32 s and 6.40 s. Set the pace with short sentences and fewer commas, then atempo.<break> is not supported. Use «...» or «—» for pauses, «،»/«,» for a breath, and [short pause] when punctuation is not enough.[tags] aloud, so strip every tag. Steer with style (0–1), speed (0.7–1.2) and <break time="0.5s"/> (3 s at most, and only a few).previous_text/next_text so the energy and intonation join up. That context is not spoken.seed makes sampling close to repeatable, though not guaranteed. Fix it for A/B tests.Convert the directed script into whatever the engine accepts:
gpt-4o-mini-tts: no inline tags, so remove them. Put the delivery into the instructions field, for example: "energetic young narrator, fast, smiling, one short laugh after the joke".<break>, <prosody rate pitch> and <emphasis>. Use Azure's <mstts:express-as style> only on voices that list that style; check the voice's style list first.Whatever the engine, the step 2 rewrite does most of the work.
Tag behaviour and speaking rate depend on the voice. Once per voice:
tag_lint.py SCRIPT --calibrate AUDIO.mp3. It measures the voice's real characters per second from one finished take, for free. Pass that number as --cps from then on.ab.py. Record what works in the tested-voices table in references/audio-tags.md.| Path | What |
|---|---|
references/persian-delivery.md |
Persian for the ear: colloquial register, interjections, punctuation as a score, emphasis without capitals, before/after examples |
references/english-delivery.md |
The same for English |
references/audio-tags.md |
Tag catalogue by job, tested-voices table, what never to tag |
references/fa-traps.tsv |
Persian words spelled unlike they sound (Arabic «ال», final «ی» said «ا»); the reading checks warn on them |
scripts/tag_lint.py |
Free checker: required beat labels and arc, ear-rewrite rules, tags, model errors, Persian readings, A/B plan, --approve / --check-approved, --calibrate |
scripts/ab.py |
Variants × stability on the real voice with a fixed seed, STT leak and event detection, LISTEN FOR, --dry-run, --lexicon |
scripts/reading.py |
Shared lexicon loading (✓ = confirmed by ear), respelling and the Persian reading checks |
examples/ |
A directed Persian and English reel script, with beat labels |
Last scanned: 11/5/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-11-05T11:53:27.546Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how tts-director compares with popular alternatives.
English · فارسی
یه اسکیل برای ایجنتهای هوش مصنوعی که متن رو قبل از تبدیل به صدا کارگردانی میکنه. نتیجهاش صدای یه آدم واقعی و پرانرژیه، نه کسی که از رو کاغذ میخونه.
اول برای فارسی ساخته شده و انگلیسی رو هم پشتیبانی میکنه. روی تگهای صوتی ElevenLabs v3/v4 تمرکز داره و برای سرویسهای دیگهی TTS هم راهنما داره.
بیشتر متنهایی که به TTS داده میشن به یکی از این دو دلیل خراب میشن:
[excited] باشه، صدا شبیه یه تبلیغ اغراقآمیز میشه و بیننده رد میکنه.۱. نقشهی ضربآهنگ ویدیو رو میکشه. نقش هر خط رو مشخص میکنه: هوک، مقدمه، آیتمهای لیست، نکتهی طلایی، شوخی، دعوت به اقدام.
۲. متن رو برای گوش بازنویسی میکنه. متن محاورهای میشه، جملهها کوتاه میشن، کلمهی اصلی میره آخر جمله، و صوتهای واقعی مثل «وای»، «ببین» و «دیگه» اضافه میشن. هیچ واقعیتی از متن عوض نمیشه.
۳. تگها رو با بودجهی سفتوسخت میذاره:
۴. یه لینتر رایگان داره که بدون مصرف اعتبار اینها رو پیدا میکنه:
# HOOK 5) نداره، و قوس انرژیای که هوک قوی، افتوخیز یا تغییر لحن نداره؛آخرش هم یه برنامهی A/B میده: کدوم خطها اول تست بشن و هر کدوم چند کاراکتر خرج داره (--ab-budget نشون میده چی تو بودجه جا میشه).
۵. بدون تأیید، صدا ساخته نمیشه. بعد از اینکه متن و نقشهی بیتها رو تأیید کردی، --approve یه مهر با هش همون متن میسازه. --check-approved تا وقتی مهر با متن نخونه شکست میخوره، پس هر پایپلاین TTS میتونه ساخت صدا رو به اون وصل کنه.
۶. قبل از ساخت کل ویس، جملههای حساس رو A/B تست میکنه و با صدای خودت چند نسخه میسازه:
--dry-run هزینه رو قبل از ارسال نشون میده؛با Claude Code و هر ایجنتی که اسکیلهای SKILL.md رو بخونه کار میکنه. اسکریپتها با Python 3.9+ نوشته شدن و هیچ وابستگیای ندارن؛ ffmpeg اختیاریه.
برای Claude Code بهعنوان اسکیل شخصی:
git clone https://github.com/aligh98/tts-director ~/.claude/skills/tts-director
یا داخل .claude/skills/ یه پروژه کلونش کن. هر وقت متنی قراره به TTS بره، یا ازش بخوای صدا انسانیتر و پرهیجانتر بشه، خودش فعال میشه.
# Free: beat map, arc, ear-rewrite and reading checks, A/B plan
python scripts/tag_lint.py examples/reel-fa.txt --model eleven_v4 --tempo 1.15 --ab-budget 160
# After the text is approved: stamp it, and gate every TTS call on the stamp
python scripts/tag_lint.py script.txt --approve
python scripts/tag_lint.py script.txt --check-approved # exit 0 approved, 3 not
# Free: measure your voice's real speaking rate from one finished take
python scripts/tag_lint.py script.txt --calibrate voice.mp3
# Check the cost first (sends nothing)
python scripts/ab.py "[excited] وای! فقط تا جمعه وقت داری!" "وای... فقط تا جمعه وقت داری!" --stability 0.35 --stability 0.5 --out probe --dry-run
# Generate and transcribe each variant (uses ElevenLabs credits)
export ELEVENLABS_API_KEY=...
python scripts/ab.py "[excited] وای! فقط تا جمعه وقت داری!" --voice YOUR_VOICE_ID --lang fa --en-check --out probe
گزینههای ab.py:
--prev و --next: خط قبل و بعد رو بهعنوان زمینه به مدل میدن تا لحن جملهها به هم بچسبه.--lexicon words.tsv: یه فایل نوشتار<TAB>گفتار<TAB>یادداشت برای درست کردن تلفظ اسمها و کلمههای خارجی، مثل اپ ← اَپْ. یادداشتی که با «✓» شروع بشه یعنی یه نفر با گوش تأییدش کرده؛ برای بقیه LISTEN FOR چاپ میشه. همین گزینه رو tag_lint.py هم میگیره.--en-check: کلیپ رو بهصورت انگلیسی هم به متن تبدیل میکنه تا اگه یه تگ انگلیسی بلند خونده شده باشه، معلوم بشه.تستهای آفلاین: python -m unittest discover tests
eleven_v4 تنظیم سرعت و style رو نادیده میگیره. یه جمله رو با سرعت ۰.۸ و ۱.۲ ساختیم و طولش تقریباً یکی شد (۶.۳۲ و ۶.۴۰ ثانیه). روی v4 فقط stability اثر داره. سرعت رو بعد از ساخت با ffmpeg -af atempo=1.1 تنظیم کن؛ زیر و بمی صدا عوض نمیشه.multilingual_v2، flash و turbo تگها رو بلند میخونن. v3 و v4 هم <break> رو نمیشناسن؛ به جاش از «...» استفاده کن.[laughs] یا [chuckles] بذار.مفیدترین کمک، اضافه کردن یه ردیف به جدول صداهای تستشده توی references/audio-tags.md است: صدا، مدل و زبان؛ کدوم تگها اجرا شدن و کدوم نه؛ و سرعت حرف زدن اون صدا. راهنمای زبانهای دیگه هم با نام references/<زبان>-delivery.md خوشاومده.
MIT. این پروژه هیچ ارتباطی با ElevenLabs نداره و «ElevenLabs» علامت تجاری صاحبش است.
tts-director is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by aligh98. Agent skill that directs scripts for TTS (ElevenLabs v3/v4 tags): rewrite for the ear, tag budget, free linter, A/B tester. | اسکیلی برای کارگردانی متن قبل از TTS: بازنویسی برای گوش، تگگذاری بدون زیادهروی، لینتر رایگان و تست A/B. فارسیمحور. It has 88 GitHub stars.
Yes. tts-director passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/aligh98/tts-director" and add it to your Claude Code skills directory (see the Installation section above). tts-director ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
tts-director is primarily written in Python. It is open-source under aligh98 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh tts-director against similar tools.
No comments yet. Be the first to share your thoughts!