Communitygithub.com

libz-renlab-ai/TeamBrain

Prétraitement d'actifs pour les compositions HyperFrames — synthèse vocale (Kokoro), transcription audio/vidéo (Whisper) et suppression d'arrière-plan pour les superpositions transparentes (u2net).

Qu'est-ce que TeamBrain ?

Ce skill regroupe trois commandes CLI essentielles pour préparer les médias avant de les assembler dans une composition HyperFrames : `tts` (synthèse vocale), `transcribe` (transcription avec horodatage) et `remove-background` (suppression d'arrière-plan). Chaque commande télécharge automatiquement son modèle lors de la première exécution et le met en cache dans `~/.cache/hyperframes/`. Il est particulièrement utile aux développeurs et créateurs de contenu qui souhaitent générer des voix off à partir de texte, transcrire des paroles en sous-titres, ou isoler un sujet sur fond transparent pour des effets de superposition. Le skill prend en charge plusieurs langues pour la synthèse vocale grâce aux voix Kokoro-82M, la transcription multilingue avec Whisper, et la suppression d'arrière-plan par u2net. Il s'intègre parfaitement avec le skill `hyperframes` pour référencer les actifs produits dans les compositions HTML.

Compatible avec~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/libz-renlab-ai/TeamBrain/tree/HEAD/.agents/skills/hyperframes-media

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Prétraitement des Médias HyperFrames

Trois commandes CLI qui produisent des actifs pour les compositions : tts (parole), transcribe (horodatage) et remove-background (vidéo transparente). Chacune télécharge un modèle lors de la première exécution et le met en cache dans ~/.cache/hyperframes/. Déposez la sortie dans le projet, puis référencez-la depuis le HTML de la composition — voir le skill hyperframes pour les conventions des éléments audio/vidéo.

Synthèse Vocale (tts)

Générez un fichier audio de parole localement avec Kokoro-82M. Aucune clé API requise.

npx hyperframes tts "Texte ici" --voice af_nova --output narration.wav
npx hyperframes tts script.txt --voice bf_emma --output narration.wav
npx hyperframes tts --list                       # toutes les 54 voix

Sélection de la Voix

Adaptez la voix au contenu. La voix par défaut est af_heart.

Type de contenuVoixRaison
Démo produitaf_heart/af_novaChaleureuse, professionnelle
Tutoriel / mode d'emploiam_adam/bf_emmaNeutre, facile à suivre
Marketing / promoaf_sky/am_michaelÉnergique ou autoritaire
Documentationbf_emma/bm_georgeAnglais britannique clair, formel
Décontracté / socialaf_heart/af_skyAccessible, naturel

Multilingue

Les identifiants de voix encodent la langue dans la première lettre : a=anglais américain, b=anglais britannique, e=espagnol, f=français, h=hindi, i=italien, j=japonais, p=portugais brésilien, z=mandarin. Le CLI détecte automatiquement la locale du phonémiseur à partir du préfixe — pas besoin de --lang lorsque la voix correspond au texte.

npx hyperframes tts "La reunión empieza a las nueve" --voice ef_dora --output es.wav
npx hyperframes tts "今日はいい天気ですね" --voice jf_alpha --output ja.wav

Utilisez --lang uniquement pour remplacer la détection automatique (accents stylisés). Codes valides : en-us, en-gb, es, fr-fr, hi, it, pt-br, ja, zh. La phonémisation non-anglaise nécessite espeak-ng installé sur le système (brew install espeak-ng / apt-get install espeak-ng).

Vitesse

  • 0.7-0.8 — tutoriel, contenu complexe, accessibilité
  • 1.0 — rythme naturel (par défaut)
  • 1.1-1.2 — intros, transitions, contenu dynamique
  • 1.5+ — rarement approprié ; testez avec soin

Scripts Longs

Pour plus de quelques paragraphes, écrivez dans un fichier .txt et transmettez le chemin. Les entrées de plus d'environ 5 minutes de parole peuvent bénéficier d'une division en segments.

Prérequis

Python 3.8+ avec kokoro-onnx et soundfile (pip install kokoro-onnx soundfile). Le modèle se télécharge lors de la première utilisation (~311 Mo + ~27 Mo de voix, mis en cache dans ~/.cache/hyperframes/tts/).

Transcription (transcribe)

Produisez un transcript.json normalisé avec des horodatages au niveau du mot.

npx hyperframes transcribe audio.mp3
npx hyperframes transcribe video.mp4 --model small --language es
npx hyperframes transcribe subtitles.srt          # importer existant
npx hyperframes transcribe subtitles.vtt
npx hyperframes transcribe openai-response.json

Règle de Langue (Non-Négociable)

N'utilisez jamais les modèles .en sauf si l'utilisateur déclare explicitement que l'audio est en anglais. Les modèles .en (small.en, medium.en) traduisent l'audio non anglais en anglais au lieu de le transcrire. Cela détruit silencieusement la langue d'origine.

  1. Langue connue et non anglaise → --model small --language <code> (pas de suffixe .en)
  2. Langue connue et anglaise → --model small.en
  3. Langue inconnue → --model small (pas de .en, pas de --language) — Whisper détecte automatiquement

Le modèle par défaut est small, pas small.en.

Tailles des Modèles

ModèleTailleVitesseQuand l'utiliser
tiny75 MoLe plus rapideAperçus rapides, test du pipeline
base142 MoRapideCourts extraits, audio clair
small466 MoModéréePar défaut — la plupart des contenus
medium1,5 GoLenteContenu important, audio bruité, musique
large-v33,1 GoLa plus lenteQualité production

Musique avec voix : commencez au minimum avec medium ; les pistes produites nécessitent souvent une importation manuelle SRT/VTT. Pour les vérifications de qualité des sous-titres (obligatoires après chaque transcription), les règles de réessai, le nettoyage JS, et le chemin d'importation via l'API OpenAI/Groq, voir hyperframes/references/transcript-guide.md.

Structure de Sortie

Les compositions consomment un tableau plat d'objets mot. Le champ id (w0, w1, ...) est ajouté lors de la normalisation pour des références stables dans les surcharges de sous-titres ; il est optionnel pour la rétrocompatibilité.

[
  { "id": "w0", "text": "Hello", "start": 0.0, "end": 0.5 },
  { "id": "w1", "text": "world.", "start": 0.6, "end": 1.2 }
]

Suppression d'Arrière-Plan (remove-background)

Supprimez l'arrière-plan d'une vidéo ou d'une image afin qu'elle puisse être utilisée comme superposition transparente dans une composition (par exemple, un avatar flottant sur un fond de scène).

npx hyperframes remove-background avatar.mp4 -o transparent.webm  # par défaut : VP9 alpha WebM
npx hyperframes remove-background avatar.mp4 -o transparent.mov   # ProRes 4444 (montage)
npx hyperframes remove-background portrait.jpg -o cutout.png      # découpage d'image unique
npx hyperframes remove-background avatar.mp4 -o transparent.webm --device cpu
npx hyperframes remove-background --info                          # fournisseurs détectés

Utilise u2net_human_seg (MIT). La première exécution télécharge environ 168 Mo de poids dans ~/.cache/hyperframes/background-removal/models/.

Format de Sortie

FormatQuand l'utiliser
.webm (VP9 + alpha)Par défaut. Les compositions le lisent directement via <video>.
.mov (ProRes 4444)Montage dans DaVinci/Premiere/FCP. Fichiers volumineux.
.pngDécoupage d'image unique (sujet fixe, superposé sur un fond).

Chrome décode l'alpha VP9 nativement, donc le .webm s'intègre dans une composition comme n'importe quelle vidéo en autoplay muet — voir le skill hyperframes pour les conventions de pistes <video>.

TTS → Transcription → Sous-Titres

Lorsqu'il n'y a pas de voix off préenregistrée, générez-en une et retranscrivez-la pour obtenir des horodatages au niveau du mot pour les sous-titres :

npx hyperframes tts script.txt --voice af_heart --output narration.wav
npx hyperframes transcribe narration.wav   # → transcript.json

Whisper extrait des limites de mots précises à partir de l'audio généré, de sorte que le timing des sous-titres correspond à la livraison sans réglage manuel.

Individual skills in this repo

This repo contains 5 individual skills — each has its own dedicated page.

libz-renlab-ai/TeamBrain

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, and registry discovery.

libz-renlab-ai/TeamBrain

Create video compositions, animations, title cards, overlays, captions, voiceovers, audio-reactive visuals, and scene transitions in HyperFrames HTML. Use when asked to build any HTML-based video content, add captions or subtitles synced to audio, generate text-to-speech narration, create audio-reactive animation (beat sync, glow, pulse driven by music), add animated text highlighting (marker sweeps, hand-drawn circles, burst lines, scribble, sketchout), or add transitions between scenes (crossfades, wipes, reveals, shader transitions). Covers composition authoring, timing, media, and the full video production workflow. For CLI commands (init, lint, preview, render, transcribe, tts) see the hyperframes-cli skill.

libz-renlab-ai/TeamBrain

Translate an existing Remotion (React-based) video composition into a HyperFrames HTML composition. Use ONLY when the user explicitly asks to port, convert, migrate, translate, or rewrite a Remotion composition as HyperFrames — for example "port my Remotion project to HyperFrames", "convert this Remotion code to HyperFrames", "migrate from Remotion", "translate this Remotion comp", or "rewrite this as HyperFrames HTML". Do NOT use when (a) the user is authoring a NEW HyperFrames composition, even if they have or are A/B-testing a similar Remotion video; (b) the user mentions Remotion in passing without asking for migration; (c) the user shares Remotion code as reference material rather than asking for a translation; (d) the user asks for "the same video as my Remotion one" without explicitly asking to migrate the source — treat that as a fresh HyperFrames build. When in doubt, default to authoring a native HyperFrames composition with the `hyperframes` skill instead. Skill detects unsupported patterns (use...

libz-renlab-ai/TeamBrain

Capture a website and create a HyperFrames video from it. Use when: (1) a user provides a URL and wants a video, (2) someone says "capture this site", "turn this into a video", "make a promo from my site", (3) the user wants a social ad, product tour, or any video based on an existing website, (4) the user shares a link and asks for any kind of video content. Even if the user just pastes a URL — this is the skill to use.

libz-renlab-ai/TeamBrain

HyperFrames CLI tool — hyperframes init, lint, inspect, preview, render, transcribe, tts, doctor, browser, info, upgrade, compositions, docs, benchmark. Use when scaffolding a project, linting, validating, inspecting visual layout in compositions, previewing in the studio, rendering to video, transcribing audio, generating TTS, or troubleshooting the HyperFrames environment.

Skills associés