hyperframes-media
Original:🇺🇸 English
Translated
Asset preprocessing for HyperFrames compositions — text-to-speech narration (Kokoro), audio/video transcription (Whisper), and background removal for transparent overlays (u2net). Use when generating voiceover from text, transcribing speech for captions, removing the background from a video or image to use as a transparent overlay, choosing a TTS voice or whisper model, or chaining these (TTS → transcribe → captions). Each command downloads its own model on first run.
146.6kinstalls
Sourceheygen-com/hyperframes
Added on
NPX Install
npx skill4agent add heygen-com/hyperframes hyperframes-mediaTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →HyperFrames Media Preprocessing
Three CLI commands that produce assets for compositions: (speech), (timestamps), and (transparent video). Each downloads a model on first run and caches it under . Drop the output into the project, then reference it from the composition HTML — see the skill for the audio/video element conventions.
ttstranscriberemove-background~/.cache/hyperframes/hyperframesText-to-Speech (tts
)
ttsGenerate speech audio locally with Kokoro-82M. No API key.
bash
npx hyperframes tts "Text here" --voice af_nova --output narration.wav
npx hyperframes tts script.txt --voice bf_emma --output narration.wav
npx hyperframes tts --list # all 54 voicesVoice Selection
Match voice to content. Default is .
af_heart| Content type | Voice | Why |
|---|---|---|
| Product demo | | Warm, professional |
| Tutorial / how-to | | Neutral, easy to follow |
| Marketing / promo | | Energetic or authoritative |
| Documentation | | Clear British English, formal |
| Casual / social | | Approachable, natural |
Multilingual
Voice IDs encode language in the first letter: =American English, =British English, =Spanish, =French, =Hindi, =Italian, =Japanese, =Brazilian Portuguese, =Mandarin. The CLI auto-detects the phonemizer locale from the prefix — no needed when the voice matches the text.
abefhijpz--langbash
npx hyperframes tts "La reunión empieza a las nueve" --voice ef_dora --output es.wav
npx hyperframes tts "今日はいい天気ですね" --voice jf_alpha --output ja.wavUse only to override auto-detection (stylized accents). Valid codes: , , , , , , , , . Non-English phonemization requires system-wide ( / ).
--langen-usen-gbesfr-frhiitpt-brjazhespeak-ngbrew install espeak-ngapt-get install espeak-ngSpeed
- — tutorial, complex content, accessibility
0.7-0.8 - — natural pace (default)
1.0 - — intros, transitions, upbeat content
1.1-1.2 - — rarely appropriate; test carefully
1.5+
Long Scripts
For more than a few paragraphs, write to a file and pass the path. Inputs over ~5 minutes of speech may benefit from splitting into segments.
.txtRequirements
Python 3.8+ with and (). Model downloads on first use (~311 MB + ~27 MB voices, cached in ).
kokoro-onnxsoundfilepip install kokoro-onnx soundfile~/.cache/hyperframes/tts/Transcription (transcribe
)
transcribeProduce a normalized with word-level timestamps.
transcript.jsonbash
npx hyperframes transcribe audio.mp3
npx hyperframes transcribe video.mp4 --model small --language es
npx hyperframes transcribe subtitles.srt # import existing
npx hyperframes transcribe subtitles.vtt
npx hyperframes transcribe openai-response.jsonLanguage Rule (Non-Negotiable)
Never use models unless the user explicitly states the audio is English. models (, ) translate non-English audio into English instead of transcribing it. This silently destroys the original language.
.en.ensmall.enmedium.en- Language known and non-English → (no
--model small --language <code>suffix).en - Language known and English →
--model small.en - Language unknown → (no
--model small, no.en) — whisper auto-detects--language
Default model is , not .
smallsmall.enModel Sizes
| Model | Size | Speed | When to use |
|---|---|---|---|
| 75 MB | Fastest | Quick previews, testing pipeline |
| 142 MB | Fast | Short clips, clear audio |
| 466 MB | Moderate | Default — most content |
| 1.5 GB | Slow | Important content, noisy audio, music |
| 3.1 GB | Slowest | Production quality |
Music with vocals: start at minimum; produced tracks often need manual SRT/VTT import. For caption-quality checks (mandatory after every transcription), the cleaning JS, retry rules, and the OpenAI/Groq API import path, see hyperframes/references/transcript-guide.md.
mediumOutput Shape
Compositions consume a flat array of word objects. The field (, , ...) is added during normalization for stable references in caption overrides; it's optional for backwards compatibility.
idw0w1json
[
{ "id": "w0", "text": "Hello", "start": 0.0, "end": 0.5 },
{ "id": "w1", "text": "world.", "start": 0.6, "end": 1.2 }
]Background Removal (remove-background
)
remove-backgroundRemove the background from a video or image so it can sit as a transparent overlay in a composition (e.g. an avatar floating on a background plate).
bash
npx hyperframes remove-background avatar.mp4 -o transparent.webm # default: VP9 alpha WebM
npx hyperframes remove-background avatar.mp4 -o transparent.mov # ProRes 4444 (editing)
npx hyperframes remove-background portrait.jpg -o cutout.png # single-image cutout
npx hyperframes remove-background avatar.mp4 -o transparent.webm --device cpu
npx hyperframes remove-background --info # detected providersUses (MIT). First run downloads ~168 MB of weights to .
u2net_human_seg~/.cache/hyperframes/background-removal/models/Output Format
| Format | When |
|---|---|
| Default. Compositions play this directly via |
| Editing in DaVinci/Premiere/FCP. Large files. |
| Single-image cutout (still subject, layered over a backdrop). |
Chrome decodes VP9 alpha natively, so the plugs into a composition like any other muted-autoplay video — see the skill for the track conventions.
.webmhyperframes<video>TTS → Transcribe → Captions
When there's no pre-recorded voiceover, generate one and transcribe it back to get word-level timestamps for captions:
bash
npx hyperframes tts script.txt --voice af_heart --output narration.wav
npx hyperframes transcribe narration.wav # → transcript.jsonWhisper extracts precise word boundaries from the generated audio, so caption timing matches delivery without hand-tuning.