Bumblebee Skill
A skill that automatically assembles a fragmovie-style video from an arbitrary phrase.
When to activate
- The user wants to "splice a phrase out of real movies"
- The user wants a video where other actors speak their text
- Requests like "make a fragmovie", "stitch my line out of cinema", "bumblebee"
What it does
- Takes English text (one or more phrases as separate args)
- Splits each phrase by sentence terminators (.!?), processes sentences independently
- Greedy longest-match: for each sentence, finds the largest contiguous chunks of words that exist on yarn.co
- Downloads candidate mp4s, transcribes them locally with faster-whisper (word-level timestamps), checks for exact match
- Cuts with FFmpeg to millisecond precision, concatenates with short fade-in/out at splices and breathing pauses between sentences
- Optional: generates N distinct variants without clip reuse via
--variants N
Dependencies
- Python 3.9+ with
curl_cffi, faster-whisper
- FFmpeg on PATH (or
FFMPEG_BIN env var)
- No API keys required
Run
python bumblebee.py "I am your father" -o father.mp4
python bumblebee.py "Sentient is the best" -o sentient.mp4 --variants 5
python bumblebee.py "long phrase here" --variants 5
playphrase.me is consulted automatically the first time yarn fails to cover a
chunk — no flag needed. The browser bootstrap (~10-15s, one-time per run)
only happens if yarn actually misses; phrases yarn covers fully never touch
playwright. Pass --no-playphrase to stay yarn-only (e.g. when playwright
isn't installed).
Handling unreachable words (intelligent synonym substitution)
After every run bumblebee prints a machine-parseable summary line:
BUMBLEBEE_SUMMARY: {"variants_built": 5, "files": [...], "skipped_words": ["fragmovie"]}
If skipped_words is non-empty, those words were not found in yarn, in
playphrase, nor in the local cache — they have never been spoken in any
indexed movie or TV show, so no amount of retrying or extra sources will
recover them. Do not call any TTS or generate fake audio. Instead:
- Read the original phrase the user gave.
- For each unreachable word, pick a contextually-appropriate synonym that
preserves the meaning of the surrounding sentence. Use the surrounding
words and the user's apparent intent as context — for example:
fragmovie → supercut / montage / compilation
subreddit → forum / community
blockchain → network / ledger (depending on the framing)
- Briefly tell the user which words were unreachable and which synonyms
you chose, so they can override if your choice changes the meaning.
- Re-run bumblebee with the substituted phrase, keeping the same
--variants
value as the original run.
- If the second run still has skipped words, repeat the substitution loop
on those — but stop after at most two retries to avoid drifting too far
from the user's original phrase.
This intelligent substitution loop is the correct way to handle missing
words. The skill itself never invents audio; the orchestrator (you) decides
when to substitute and what to substitute with.
Architecture
bumblebee.py — CLI
src/yarn_search.py — curl_cffi (impersonate=chrome) against getyarn.io, bypasses Cloudflare
src/downloader.py — mp4 download via curl_cffi (yarn.co requires a Chrome TLS fingerprint)
src/transcriber.py — faster-whisper local inference + word-timestamps + JSON cache
src/word_matcher.py — exact match with apostrophe / prefix fuzzing
src/phrase_splitter.py — greedy longest-match, lazy playphrase fallback on yarn miss, optional shuffling and clip exclusion for variants
src/playphrase_search.py — Playwright-based playphrase.me adapter (lazy-init)
src/cutter.py — FFmpeg cut with audio fade at splice points
src/concat.py — concat demuxer
Known limitations
- yarn.co indexes English-language media only
- Whisper sometimes folds short tokens ("I", "a", "my") into longer words, so isolated short words frequently get skipped — this is an inherent limitation of word-level recognition
- A handful of "popular" yarn clips (e.g.
4e5bfded) appear in many search results and tend to be picked first; mix mode (--variants) is the workaround
- Word order is strict:
can we does not match we can (swap-fuzzy is in the TODO list)
1---2name: bumblebee3description: Surgical phrase splicing from real movies and TV shows via yarn.co. Takes any English phrase and slices it into the longest possible runs of words actually spoken on screen, then assembles a final reel where every word is delivered by a real actor. Triggers — "splice a line from movies", "make a fragmovie", "build a video from someone else's words", "bumblebee". Runs fully local with faster-whisper — no API keys. Mix mode (--variants N) generates several distinct cuts of one phrase without reusing clips.4---56# Bumblebee Skill78A skill that automatically assembles a fragmovie-style video from an arbitrary phrase.910## When to activate11- The user wants to "splice a phrase out of real movies"12- The user wants a video where other actors speak their text13- Requests like "make a fragmovie", "stitch my line out of cinema", "bumblebee"1415## What it does161. Takes English text (one or more phrases as separate args)172. Splits each phrase by sentence terminators (.!?), processes sentences independently183. Greedy longest-match: for each sentence, finds the largest contiguous chunks of words that exist on yarn.co194. Downloads candidate mp4s, transcribes them locally with faster-whisper (word-level timestamps), checks for exact match205. Cuts with FFmpeg to millisecond precision, concatenates with short fade-in/out at splices and breathing pauses between sentences216. Optional: generates N distinct variants without clip reuse via `--variants N`2223## Dependencies24- Python 3.9+ with `curl_cffi`, `faster-whisper`25- FFmpeg on PATH (or `FFMPEG_BIN` env var)26- No API keys required2728## Run29```bash30python bumblebee.py "I am your father" -o father.mp431python bumblebee.py "Sentient is the best" -o sentient.mp4 --variants 532python bumblebee.py "long phrase here" --variants 533```3435playphrase.me is consulted automatically the first time yarn fails to cover a36chunk — no flag needed. The browser bootstrap (~10-15s, one-time per run)37only happens if yarn actually misses; phrases yarn covers fully never touch38playwright. Pass `--no-playphrase` to stay yarn-only (e.g. when playwright39isn't installed).4041## Handling unreachable words (intelligent synonym substitution)4243After every run bumblebee prints a machine-parseable summary line:44```45BUMBLEBEE_SUMMARY: {"variants_built": 5, "files": [...], "skipped_words": ["fragmovie"]}46```4748If `skipped_words` is non-empty, those words were not found in yarn, in49playphrase, nor in the local cache — they have never been spoken in any50indexed movie or TV show, so no amount of retrying or extra sources will51recover them. **Do not call any TTS or generate fake audio.** Instead:52531. Read the original phrase the user gave.542. For each unreachable word, pick a **contextually-appropriate synonym** that55 preserves the meaning of the surrounding sentence. Use the surrounding56 words and the user's apparent intent as context — for example:57 - `fragmovie` → `supercut` / `montage` / `compilation`58 - `subreddit` → `forum` / `community`59 - `blockchain` → `network` / `ledger` (depending on the framing)603. Briefly tell the user which words were unreachable and which synonyms61 you chose, so they can override if your choice changes the meaning.624. Re-run bumblebee with the substituted phrase, keeping the same `--variants`63 value as the original run.645. If the second run still has skipped words, repeat the substitution loop65 on those — but stop after at most two retries to avoid drifting too far66 from the user's original phrase.6768This intelligent substitution loop is the *correct* way to handle missing69words. The skill itself never invents audio; the orchestrator (you) decides70when to substitute and what to substitute with.7172## Architecture73- `bumblebee.py` — CLI74- `src/yarn_search.py` — curl_cffi (impersonate=chrome) against getyarn.io, bypasses Cloudflare75- `src/downloader.py` — mp4 download via curl_cffi (yarn.co requires a Chrome TLS fingerprint)76- `src/transcriber.py` — faster-whisper local inference + word-timestamps + JSON cache77- `src/word_matcher.py` — exact match with apostrophe / prefix fuzzing78- `src/phrase_splitter.py` — greedy longest-match, lazy playphrase fallback on yarn miss, optional shuffling and clip exclusion for variants79- `src/playphrase_search.py` — Playwright-based playphrase.me adapter (lazy-init)80- `src/cutter.py` — FFmpeg cut with audio fade at splice points81- `src/concat.py` — concat demuxer8283## Known limitations84- yarn.co indexes English-language media only85- Whisper sometimes folds short tokens ("I", "a", "my") into longer words, so isolated short words frequently get skipped — this is an inherent limitation of word-level recognition86- A handful of "popular" yarn clips (e.g. `4e5bfded`) appear in many search results and tend to be picked first; mix mode (`--variants`) is the workaround87- Word order is strict: `can we` does not match `we can` (swap-fuzzy is in the TODO list)