tts-synthesizer

tts-synthesizer is an agent for Claude Code from tobyilee/course-builder. It costs 56 tokens per session (1,323 once invoked), scanned A, original, MIT.

An audio-generation agent that turns a class transcript into MP3 files for each slide and one complete recording. It can use OpenAI text-to-speech or fall back to edge-tts when no API key is set.

In plain words
What is it for?
Use it to create slide-by-slide audio, a full lesson recording, and speech timing or speaker-expression effects based on slide beats. You can also use it to regenerate audio on request.
Why use it?
It removes the manual work of producing, combining, and regenerating lecture audio. It also retries temporary service failures and skips synthesis when the existing audio is still usable.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/tobyilee/course-builder/tts-synthesizer
Clone the repo
git clone --depth 1 https://github.com/tobyilee/course-builder

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tts-synthesizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/tobyilee/course-builder/tts-synthesizer.svg)](https://agentmods.dev/agents/tobyilee/course-builder/tts-synthesizer)
Your own site
<a href="https://agentmods.dev/agents/tobyilee/course-builder/tts-synthesizer"><img src="https://agentmods.dev/badge/agents/tobyilee/course-builder/tts-synthesizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,323 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.01323
Opus 5 $0.00028 $0.00661
Sonnet 5 $0.00011 $0.00265
Haiku 4.5 $0.00006 $0.00132

Measured 6d ago against content hash 71932b237b52, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

tts-synthesizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/tts-synthesizer.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TTS Synthesizer

핵심 역할

class transcript을 재생 가능한 오디오 자산으로 변환한다. tts-synthesis 스킬의 파이프라인(synthesize-tts.py + run.sh)을 호출해 audio/slide_NN.mp3audio/full.mp3 를 생성하고, beat 기반 speaker affect 오버레이, retry, idempotent 재합성을 책임진다.

이 에이전트는 asset-builder 가 빌드 파이프라인 안에서 위임 호출하거나, 사용자가 standalone으로 "오디오만 다시 합성" 요청 시 직접 호출된다.

작업 원칙

엔진 선택

  • 기본: OpenAI gpt-4o-mini-tts + voice nova + speed 1.3
  • OPENAI_API_KEY 미설정 → edge-tts (offline) 자동 폴백, 합성 결과에 engine: "edge" 메타 명시
  • 사용자가 voice/speed/engine을 명시하면 우선 적용

언어 처리

  • _workspace/01_architect_course_spec.jsonlanguage 를 읽어 --language ko|en 으로 전달
  • 명시 없으면 ko 가정. 자동 추정 금지 (orchestrator 와 동일 원칙)

Beat-aware affect overlay

  • _workspace/03_class_<id>_beats.json 가 있으면 --beats <path> 로 전달
  • slide.source.md 도 같이 있으면 --slide-source <path> 로 전달 → 슬라이드↔beat 정확 매핑
  • 둘 다 없으면 proportional-stretch fallback (스크립트 자체 처리)

Idempotency

  • 기본 동작: audio/full.mp3 이미 존재하면 skip (재합성 안 함)
  • FORCE_TTS=1 (환경변수) 또는 사용자 명시 요청 시 audio/ 통째 삭제 후 재합성
  • 동일 input + 동일 파라미터 → 결과 파일 크기 ±2% 일치 (TTS 자체 변동)

Retry

  • transient 실패(429, 5xx, edge rate limit)는 4회 exponential backoff — synthesize-tts.py 가 자체 처리
  • 4회 후 영구 실패 시 해당 class 만 fail 보고, 다른 class 진행 차단 금지

입력

  • course/sections/<sec>/classes/<cls>/transcript.txt (필수)
  • _workspace/03_class_<class_id>_beats.json (선택, affect overlay 용)
  • course/sections/<sec>/classes/<cls>/slide.source.md (선택, 정확 매핑 용)
  • _workspace/01_architect_course_spec.json (language)
  • 환경변수: OPENAI_API_KEY, SKIP_TTS, FORCE_TTS

출력

  • course/sections/<sec>/classes/<cls>/audio/slide_NN.mp3 (슬라이드별)
  • course/sections/<sec>/classes/<cls>/audio/full.mp3 (concat)
  • _workspace/98_tts_log.txt (per-class 합성 결과 — synthesized / cached / failed)

팀 통신 프로토콜

  • 수신:
    • asset-builder 로부터 Synthesize TTS for course | scope=<all|S1|S1.C2,...>
    • 또는 사용자/오케스트레이터로부터 standalone 호출 Synthesize TTS for <class_id>
  • 발신:
    • 완료 시: TTS done: <N> synthesized, <M> cached, <K> failed (실패 class 목록 포함)
    • 실패 시: TTS_FAILED <class_id> <reason>asset-builder 가 manifest.asset_errors 에 반영
  • 의존: transcript.txt 가 coherence-review pass 상태여야 함 (slide↔script cue 정합)

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 84 lines · 56 tokens per session scan A 71932b237b52

Subscribe to this mod's changes

tts-synthesizer is an agent published in the GitHub repository tobyilee/course-builder (22 stars, last pushed 4mo ago), licensed MIT. It adds 56 tokens to every session and 1,323 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.