gooseworks-ai/goose-skills / skills/video/render-podcast-skit
render-podcast-skit
VerifiedRender a two-host podcast ad from a brand config and dialogue script. Includes the working planner, full-frame and split-screen assembly, captions from measured character timings, brand end card, approved paid-step adapters, and 65 quality-check falsification cases. Use for short conversational ads with two stable hosts in one room.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.3 KB |
| recipe.json | config | 25.2 KB |
| scripts/PIPELINE.md | markdown | 102 B |
| scripts/README.md | markdown | 4.1 KB |
| scripts/arcs.json | config | 9.1 KB |
| scripts/build_overlays.py | script | 15.3 KB |
| scripts/check_framing_render.py | script | 10.2 KB |
| scripts/compose_master.py | script | 28.9 KB |
| scripts/config.example.json | config | 26.9 KB |
| scripts/config_io.py | script | 3.0 KB |
| scripts/cost_model.py | script | 11.0 KB |
| scripts/crop_singles.py | script | 5.4 KB |
| scripts/gates.py | script | 67.1 KB |
| scripts/gen_paid.py | script | 24.9 KB |
| scripts/grade_episode.py | script | 13.6 KB |
| scripts/make_lockup.py | script | 3.1 KB |
| scripts/one_shot.py | script | 3.0 KB |
| scripts/pick_voices.py | script | 7.4 KB |
| scripts/plan_beats.py | script | 7.5 KB |
| scripts/plan_cuts.py | script | 23.2 KB |
| scripts/preview_framing.py | script | 4.3 KB |
| scripts/provider_commands.py | script | 4.2 KB |
| scripts/script.example.json | config | 2.1 KB |
| scripts/selftest.py | script | 32.6 KB |
| scripts/shape_vo.py | script | 6.9 KB |
| scripts/test_distribution.py | script | 6.6 KB |
| skill.meta.json | config | 511 B |
| source-manifest.json | config | 2.4 KB |
| tests/smoke-test.md | markdown | 1.6 KB |
scripts/pick_voices.py
View on GitHub#!/usr/bin/env python3
"""Propose an ElevenLabs voice for each host, matched to what they look like.
pick_voices.py --config config.json # propose, change nothing
pick_voices.py --config config.json --write # write the picks into it
WHY THIS EXISTS
`hosts.<X>.voice_id` was a bare id somebody pasted in, and nothing related it
to the person. The first real render shipped a man reading in a young woman's
voice, and `gate_host_voice_gender` was added to catch that -- but a gate can
only refuse, it cannot choose. This chooses.
HOW IT PICKS
It reads the account's own voice library, which is the only set of voices that
can actually be used without someone adding one first, and scores each against
the host's `appearance`:
* gender must match the gendered noun in appearance, or the voice is out;
* age bracket, if the appearance gives one, is worth more than anything else;
* an accent named in the appearance is worth matching. Only an ACCENT the
appearance actually names: it deliberately does not guess an accent from
where somebody looks like they are from, because that is not a thing a
face tells you. Write the accent in the appearance if it matters;
* a voice whose name or labels say conversational, podcast, natural or real
is preferred over one that says narration, character or customer service.
It PROPOSES. The operator confirms, because a voice is a casting decision and
the labels are only a starting point: two voices with identical labels do not
sound alike. `--write` records `voice_name` and `voice_gender` next to the id
so the choice is legible in the config and `gate_host_voice_gender` can check
it offline, with no network call, before any paid step.
"""
from __future__ import annotations
import argparse
import json
import os
import pathlib
import re
import sys
from urllib import error, request
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
import config_io # noqa: E402
AGES = {"young": ("twenties", "early thirties", "young", "20s", "30s"),
"middle_aged": ("thirties", "forties", "fifties", "middle", "40s", "50s"),
"old": ("sixties", "seventies", "older", "elderly", "60s", "70s")}
GOOD = ("conversational", "podcast", "natural", "real", "warm", "friendly",
"engaging", "storyteller", "casual")
BAD = ("narration", "narrator", "character", "customer", "call center",
"collections", "recovery", "meditation", "trailer", "announcer")
MALE = ("a man", "man in his", " his ", " he ")
FEMALE = ("a woman", "woman in her", " her ", " she ")
def key():
for v in ("ELEVENLABS_API_KEY", "ELEVEN_API_KEY"):
if os.environ.get(v):
return os.environ[v]
for parent in pathlib.Path(__file__).resolve().parents:
env = parent / ".env"
if not env.exists():
continue
for line in env.read_text(encoding="utf-8").splitlines():
if line.split("=", 1)[0].strip() in ("ELEVENLABS_API_KEY", "ELEVEN_API_KEY"):
val = line.split("=", 1)[1].strip().strip('"').strip("'")
if val:
return val
sys.exit("[err] no ELEVENLABS_API_KEY in the environment or any .env up the tree")
def library(tok):
req = request.Request("https://api.elevenlabs.io/v1/voices?page_size=100",
headers={"xi-api-key": tok})
try:
return json.loads(request.urlopen(req, timeout=90).read())["voices"]
except error.HTTPError as e:
sys.exit(f"[err] voice library: HTTP {e.code} {e.read()[:200].decode('utf-8','replace')}")
def wanted_gender(app: str):
low = app.lower()
m, f = any(w in low for w in MALE), any(w in low for w in FEMALE)
if m and not f:
return "male"
if f and not m:
return "female"
return None
def score(v, app: str):
lab = v.get("labels") or {}
text = f"{v.get('name','')} {' '.join(str(x) for x in lab.values())}".lower()
low = app.lower()
s = 0
for bracket, words in AGES.items():
if any(w in low for w in words):
s += 40 if lab.get("age") == bracket else -10
break
acc = (lab.get("accent") or "").lower()
if acc and acc.split()[0] in low:
s += 25
s += 8 * sum(1 for g in GOOD if g in text)
s -= 12 * sum(1 for b in BAD if b in text)
return s
def main():
ap = argparse.ArgumentParser()
ap.add_argument("--config", required=True)
config_io.add_arg(ap)
ap.add_argument("--write", action="store_true",
help="write the top pick into the config for each host")
ap.add_argument("--top", type=int, default=4)
ap.add_argument("--library", type=pathlib.Path, help="exported {voices:[...]} JSON; no account key needed")
ap.add_argument("--exclude", action="append", default=[],
help="voice id already used elsewhere. Repeatable. The "
"picker always returns the top-scored voice, so three "
"brands run back to back got the same two people and "
"would have sounded like one show.")
a = ap.parse_args()
cfg = config_io.load(a.config, a.preset)
voices = json.loads(a.library.read_text(encoding="utf-8"))["voices"] if a.library else library(key())
print(f"{len(voices)} voices on the account\n")
picks = {}
for who in sorted(cfg["hosts"]):
h = cfg["hosts"][who]
app = (h.get("appearance") or "").strip()
if not app:
sys.exit(f"[err] hosts.{who} has no 'appearance'; nothing to match against")
want = wanted_gender(app)
if not want:
sys.exit(f"[err] hosts.{who} appearance does not read clearly as a man "
f"or a woman, so a voice cannot be matched to it: {app[:60]!r}")
pool = [v for v in voices
if (v.get("labels") or {}).get("gender") == want
and v["voice_id"] not in a.exclude]
if not pool:
sys.exit(f"[err] no {want} voice on the account")
ranked = sorted(pool, key=lambda v: -score(v, app))
print(f"host {who} ({h.get('name', who)}) - {app[:62]}")
print(f" wants a {want} voice; {len(pool)} available")
for v in ranked[:a.top]:
lab = v.get("labels") or {}
mark = "->" if v is ranked[0] else " "
print(f" {mark} {v['voice_id']} {v.get('name','')[:44]:44} "
f"{lab.get('age','?'):12} {lab.get('accent','?'):10} "
f"score {score(v, app)}")
picks[who] = ranked[0]
a.exclude.append(ranked[0]["voice_id"]) # never both hosts the same
print()
if not a.write:
print("Proposed only. Re-run with --write to record them, and listen "
"before you pay for seventeen beats: labels are a starting point, "
"two voices with the same labels do not sound alike.")
return 0
p = pathlib.Path(a.config)
raw = json.loads(p.read_text(encoding="utf-8"))
for who, v in picks.items():
lab = v.get("labels") or {}
raw["hosts"][who]["voice_id"] = v["voice_id"]
raw["hosts"][who]["voice_name"] = v.get("name", "")
raw["hosts"][who]["voice_gender"] = lab.get("gender", "")
p.write_text(json.dumps(raw, indent=2), encoding="utf-8")
print(f"written into {p.name}. Run gates.py to confirm "
f"gate_host_voice_gender is happy, then listen to one beat.")
return 0
if __name__ == "__main__":
raise SystemExit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |