New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Browser-based listening pages and a voice-seed library for comparing and keeping TTS voice clips.

version
1.0.0
GitHub stars
32
View on GitHub

What it does

  • Adds the listening-page skill for side-by-side clip comparison with choices saved as JSON
  • Covers seven templates: voice-pick, ab-original, eq-mix, checkpoint-compare, term-check, pairwise, and blind-ab
  • Runs a local server on 127.0.0.1 that rejects cross-origin writes and autosaves each choice
  • Adds the voice-seeds skill to keep reference voice clips with full provenance in a git library

TTS listening pages: compare clips side by side, save picks. Voice candidates, original vs processed, EQ chains, checkpoints, blind A/B; choices saved as JSON.

Add marketplace

/plugin marketplace add danielrosehill/Claude-Code-Plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install tts-tools@danielrosehill

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Listening page

Whenever the user has to listen to more than two clips and choose (voice candidates, raw vs restored, EQ chains, model checkpoints), give them a listening page, not a playlist or a stitched file. Every clip gets its own player, the original sits next to its versions, starting one clip stops the others, and the user's picks autosave to choices.json for you to read back.

CLI: ${PLUGIN_ROOT}/bin/listen-page (stdlib Python 3). If listen-page is not on PATH, run it by that path or ln -sf ${PLUGIN_ROOT}/bin/listen-page ~/.local/bin/.

Pick the template

listen-page templates lists them:

TemplateLayoutUse for
voice-pickgridMany candidates of one line (voice design seeds, speakers): rate each, star a winner
ab-originalcompareOriginal vs processed versions of the same clips; the original is the pinned reference
eq-mixcompareThe same clips under several EQ chains or mixes; the tally names the chain to keep
checkpoint-comparecompareSystems or checkpoints reading the same lines
term-checkcomparePer-word pronunciation: Right / Close / Wrong for each highlighted word under every clip (code-switching, names)
pairwisepairwiseChoosing between systems: blind A vs B against a target, A / B / Not sure / Neither, how much better, reason chips, unusable flags; Bradley-Terry ranking, playoff for the top k
blind-abcompareAs above, columns shuffled per row and labelled "Version n" until the user reveals

Grid = flat candidates, grouped by filename prefix (A0..A4, B0.. -> groups A, B). Compare = rows are clips/lines, columns are versions; one subfolder per version, files matched by stem.

Steps

  1. Lay out the clips. Grid: all clips in one folder. Compare: DIR/<version>/<item>.<ext>, e.g. raw/, sidon/, warm-eq/, each with l01.mp3, l02.mp3.... Prefer mp3 (small, plays everywhere). Level-match versions (e.g. loudnorm=I=-19) so louder doesn't win.
  2. Generate the spec and page:
    listen-page scan DIR --template <name> [--ref raw] --title "..." --question "..."
    
    This writes DIR/listen.json and DIR/index.html.
  3. Enrich listen.json when it helps the listener, then listen-page build DIR/listen.json:
    • group note (e.g. the voice-design attributes behind set A),
    • row text (the sentence being read),
    • column label ("warm: lowshelf +2, de-ess" beats warm),
    • highlight on rows/clips: the words the listener should judge (code-switched terms, names).
  4. Serve it in the background and open the browser:
    listen-page serve DIR        # prints the 127.0.0.1 URL; run in background
    
    Tell the user in one line what's on the page and to press Submit.
  5. Wait: listen-page wait DIR (blocks until Submit; run in the background), or read when the user says they're done.
  6. Read: listen-page result DIR (or --json). Fields: winner, ratings{clip: choice}, picks{row: column}, terms{"row|column": {word: verdict}} and term_notes (same keys, free text per word; term-check), tally{column: n}, excluded [columns the listener ruled out with ✕ Exclude], notes{id: text}, comment, status. Notes are instructions. Record the verdict where the project keeps listening results, then stop the server (pkill -f "listen-page serve DIR").

Pairwise rounds (preferred for picking a winner among systems)

Same compare-style spec (columns, reference = the target, rows with clips), "template": "pairwise". build generates all pairs of non-reference columns (each pair on a different row, sides randomised, pair ids a~b@row) and writes them back into the spec. Drop systems with "exclude": [...]. Override reasons / strengths per study. Then:

listen-page result DIR --spec listen-pairwise.json          # Bradley-Terry ranking, win reasons, strengths, unusable counts, notes
listen-page playoff DIR --spec listen-pairwise.json --top 3 # new spec with all pairs among the top 3 on fresh rows

Prefer pairwise over many-column pages when the listener must choose among 4+ systems: one decision at a time, and the reasons say why a system wins. Keep a round to ~10-15 pairs.

Spec format (listen.json)

{"template": "voice-pick", "title": "...", "question": "...", "intro": "...",
 "groups": [{"name": "Set A", "note": "male, young adult", "clips": [{"id": "A0", "label": "A0", "src": "A0.mp3", "text": "optional"}]}]}
{"template": "ab-original", "reference": "raw",
 "columns": [{"id": "raw", "label": "Original"}, {"id": "sidon", "label": "Sidon"}],
 "rows": [{"id": "l01", "label": "l01", "text": "the sentence", "clips": {"raw": "raw/l01.mp3", "sidon": "sidon/l01.mp3"}}]}

For term-check, a clip or row may also carry syllables ({word: [[syl, ...] per space-separated word]}) and asked ({word: [stressed syllable index per word]}). When the listener marks a word Close or Wrong, its syllables appear as "Heard stress" / "Should be" chips (the asked syllable underlined); the answers land in stress{cell: {word: {heard: ["w.s"], should: ["w.s"]}}}. Use it for stress errors in code-switched words.

Any template key can be overridden in the spec: layout, ratings (grid buttons), pick_label, blind, seed (blind shuffle), ref_pickable (whether the reference can be preferred), highlight (list of words to mark in the clip/row text: top level, per clip or per row; use it for the words under test, e.g. code-switched terms or names whose pronunciation the listener should judge).

Data storage

Writes only inside the clip folder: listen.json, index.html, choices.json, .listen-url. Opened as file:// (not served), choices stay in the browser and the page shows JSON to copy back.

Notes

  • The server binds 127.0.0.1 only and rejects cross-origin POSTs. Nothing leaves the machine.
  • Paths in the spec are relative to the page, so keep index.html in the clip folder.
  • For a page to share remotely, upload the folder (page + clips) to static hosting as is; choices then fall back to copy-paste JSON.

Readme

TTS-Tools

A harness for text-to-speech and voice work. The first tool is listen-page: a local web page for listening to clips side by side and choosing between them, with the choices saved as JSON for the agent to act on. Use it instead of playlists or stitched comparison files when you need to hear the original, then one version, then another.

TemplateLayoutFor
voice-pickgridMany voice candidates: rate each (Shortlist / Maybe / No), star a winner
ab-originalcompareOriginal vs processed versions of the same clips
eq-mixcompareOne set of clips under several EQ chains or mixes, with a per-chain tally
checkpoint-comparecompareModel systems or checkpoints reading the same lines
term-checkcomparePer-word Right / Close / Wrong under every clip, for code-switched terms or names
pairwisepairwiseBlind A/B pairs against a target, with how-much and why; Bradley-Terry ranking and play-off rounds
blind-abcompareColumns shuffled per row, labels hidden until "Reveal labels"
bin/listen-page scan runs/voice-design --template voice-pick --question "Most neutral narrator?"
bin/listen-page scan runs/polish --template eq-mix --ref raw   # one subfolder per chain, files matched by stem
bin/listen-page serve runs/polish        # http://127.0.0.1:<port>/index.html, autosaves choices.json
bin/listen-page wait runs/polish         # returns when the listener presses Submit
bin/listen-page result runs/polish --json
  • Stdlib Python 3, no dependencies; the page is one self-contained HTML file next to the clips.
  • Highlighting: mark the words under test (code-switched terms, names) in each line's text.
  • One clip plays at a time; loop toggle; per-clip and per-row notes; overall comment.
  • The server binds 127.0.0.1 and rejects cross-origin writes. Opened from disk, the page keeps choices in the browser and shows JSON to copy back.

Skills

  • listening-page: when and how an agent builds, serves and reads a listening page.
  • voice-seeds: keep a git library of reference voice clips (designed voices, anchors) with full provenance; add, denoise, review. Library path in ~/.claude-user-data/tts-tools/config.json.

Installation

claude plugins install tts-tools@danielrosehill

Licence

MIT.

Details

Marketplace
danielrosehill/Claude-Code-Plugins
Source
danielrosehill/TTS-Tools
Author
Daniel Rosehill
Category
Media Editing
License
MIT

More from danielrosehill/Claude-Code-Plugins

All 264

Similar to tts-tools

More Media & Audio/Video