Find lyrics with agy when LRCLIB has nothing, keeping the best of several non-deterministic answers

This commit is contained in:
Jonathan Sykes
2026-09-21 11:44:43 +08:00
parent 808306ffce
commit e6d14b9eb4
4 changed files with 344 additions and 0 deletions

View File

@@ -405,6 +405,11 @@ Skills live in `.agents/skills/` (symlinked into `.claude/skills/`):
- **mobile-app-ui-design** — UI/UX design work on the PWA screens.
- **lyrics-lookup** — fill in songs that have NO lyrics (LRCLIB → agy web search → local faster-whisper).
- **lyrics-regenerate** — back up, then replace wrong/mistimed lyrics from LRCLIB (`scripts/lyrics/lrclib_regen.py`).
- **lyrics-agy** — last resort when LRCLIB has nothing: agy (flat-rate) searches the web and often returns
LRC-timed lyrics (`scripts/lyrics/agy_lyrics.py`). Also the `--from-file` path for pasting lyrics you already have.
agy is NOT deterministic — the script asks up to `--tries` times and keeps the best (timed > untimed > longer).
Its answer arrives on **stderr**, long answers are truncated behind a `keep_id`, and a quota-failed instance
returns error prose inside a `STATUS: ok` envelope that will parse as lyrics if you let it.
### Matching a song on LRCLIB (learned the hard way)
`/api/streams` gives the YouTube **channel**, not the artist, so a title+artist