Generate voice-over audio (MP3/WAV) from a script via TTS API (ElevenLabs default, OpenAI/Cartesia configurable). Takes an `audio-script.json` (produced by remotion-builder) and produces `audio.mp3` synced to beat timings. Pure orchestration skill — wraps API call + writes file. Pair with `/render-video` command for full pipeline.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ciromaciel-video-creator:tts-generatorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Gera áudio de voz a partir de um audio-script.json. NÃO escreve script — apenas converte texto → áudio.
Gera áudio de voz a partir de um audio-script.json. NÃO escreve script — apenas converte texto → áudio.
Built for: pipeline de vídeo automatizado (Remotion). Audio é input do npx remotion render — sem ele, vídeo fica mudo ou usa só caption burned-in.
remotion-builder produziu audio-script.json/render-video rodar o Remotion renderclients/<nome>/campaigns/<campaign>-assets/video/<slug>/audio-script.json
Schema:
{
"voice": "<provider-specific voice ID>",
"language": "en-US | pt-BR | etc",
"provider": "elevenlabs | openai | cartesia",
"lines": [
{ "id": "L01", "fromSec": 0, "text": "..." },
...
],
"settings": {
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0
}
}
<slug>/
├── audio.mp3 ← arquivo final, mixado, single track
├── audio-segments/ ← segmentos individuais (debug/regen)
│ ├── L01.mp3
│ ├── L02.mp3
│ └── ...
└── audio-meta.json ← timing real de cada segment + duração total
audio-meta.json schema:
{
"totalDurationSec": 75.3,
"segments": [
{ "id": "L01", "startSec": 0, "endSec": 4.2, "durationSec": 4.2, "file": "audio-segments/L01.mp3" },
{ "id": "L02", "startSec": 4.5, "endSec": 12.1, "durationSec": 7.6, "file": "audio-segments/L02.mp3" }
]
}
Pequeno gap (0.2-0.5s) entre segments evita corte abrupto. Se total ultrapassar duration do props.json, halt e alerta — precisa script mais curto OU duração maior.
| Provider | Env vars | Custo aprox |
|---|---|---|
| ElevenLabs (default) | ELEVENLABS_API_KEY (obrigatória) + ELEVENLABS_VOICE_ID (opcional — fallback default) | $0.30 / 1k chars |
| OpenAI | OPENAI_API_KEY + OPENAI_TTS_VOICE (opcional) | $15 / 1M chars |
| Cartesia | CARTESIA_API_KEY + CARTESIA_VOICE_ID (opcional) | $0.06 / 1k chars (cheaper) |
Default = ElevenLabs (melhor qualidade pra voice work em 2026). Override por provider no audio-script.json.
Pra cada line do audio-script.json, o voice usado é resolvido nessa ordem:
line.voiceOverride (se setado per-line — raro)audio_script.voice (top-level config)ELEVENLABS_VOICE_ID, etc.)Isso permite ao usuário ter um voice padrão exportado no shell (export ELEVENLABS_VOICE_ID=...) e o remotion-builder pode omitir voice do audio-script.json quando o user já tem um default global.
audio-script.json, props.json, ou qualquer arquivo do repo~/.zshrc ou ~/.bash_profile, gitignored)| Voice ID | Idioma | Estilo |
|---|---|---|
pNInz6obpgDQGcFmaJgB | en-US | Professional male, neutral |
EXAVITQu4vr4xnSDxMaL | en-US | Professional female, warm |
21m00Tcm4TlvDq8ikWAM | en-US | Conversational male |
| (configurar PT-BR via voice clone ou multilingual model) | pt-BR | — |
Use sempre eleven_multilingual_v2 model pra PT-BR ou EN com tom natural.
alloy (neutral), echo (male), fable (UK), onyx (deep male), nova (female), shimmer (warm female)# pseudo-código — implementação real fica no /render-video command
for line in audio_script["lines"]:
audio_bytes = call_tts_api(
text=line["text"],
voice=audio_script["voice"],
language=audio_script["language"]
)
write(f"audio-segments/{line['id']}.mp3", audio_bytes)
measured_duration = ffprobe(f"audio-segments/{line['id']}.mp3")
record_meta(line["id"], line["fromSec"], measured_duration)
# Concatena com gaps de 0.3s
mix_segments_to_single_mp3("audio.mp3")
write_meta("audio-meta.json")
Implementação real: Node ou Python script invocado pelo /render-video command — esta skill define o contrato.
temperature: 0 se quiser bit-exact.audio-segments/.cache/<hash>.mp3.audio-meta.json é input pro Remotion ajustar caption timing às durações REAIS do TTS (que variam vs estimativa do roteiro)./render-videoCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub ciro-maciel/ciromacielos --plugin ciromaciel-video-creator