Communitygithub.com

Transcrire une vidéo

Transcrit localement des fichiers vidéo/audio en texte avec horodatages mot par mot via un service whisper.cpp embarqué dans un conteneur Docker. Retourne transcript.txt, transcript.srt et transcript.words.json. Utilisé comme brique par /produce-video.

Qu'est-ce que Transcrire une vidéo ?

Cette compétence permet de transcrire n'importe quel fichier vidéo ou audio en texte localement, sans dépendre d'API cloud externe ni de projet distant. Elle s'appuie sur whisper.cpp, un portage efficace de Whisper d'OpenAI, embarqué dans un conteneur Docker compilé à la demande. Le script gère automatiquement la construction de l'image Docker, le démarrage du conteneur, l'extraction du son en WAV 16 kHz mono via ffmpeg, puis l'appel au service de transcription. Les résultats incluent un fichier texte brut, un fichier SRT de sous-titres, et un fichier JSON d'horodatages mot par mot (essentiel pour les superpositions synchronisées). La compétence est conçue pour être appelée directement par l'utilisateur ou comme sous-étape de /produce-video. Les prérequis sont Docker en fonctionnement, ffmpeg sur le PATH, et Node ≥ 22.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/AlemTuzlak/skills/tree/HEAD/skills/transcribe-video

Demander à votre IA préférée

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

Documentation

Que fait Transcrire une vidéo ?

Transcrit n'importe quel fichier vidéo/audio localement à l'aide d'un service whisper.cpp embarqué. Aucun projet externe ni API cloud. Renvoie des horodatages mot par mot (nécessaires pour les superpositions/sous-titres synchronisés).

Quand l'utiliser

  • « Transcris ce clip / vidéo / audio », « donne-moi une transcription avec horodatages ».
  • Comme sous-étape de /produce-video.

Comment ça s'exécute

Tout est piloté par le lanceur embarqué — ne demandez jamais à l'utilisateur de gérer Docker :

node scripts/transcribe.mjs <chemin-vers-la-vidéo-ou-audio> [--out <dossier>] [--port 9111] [--language en] [--no-word-ts] [--task transcribe|translate]
node scripts/transcribe.mjs --stop      # arrêter le conteneur chaud

Le lanceur :

  1. Vérifie que le démon Docker est accessible (échec bruyant avec conseils si ce n'est pas le cas).
  2. Construit l'image transcribe-video-whisper depuis assets/whisper-service/ si elle est manquante (la première construction est lente : elle compile whisper.cpp et intègre le modèle ggml-base.en.bin).
  3. Démarre le conteneur transcribe-video-whisper (port hôte 9111 → conteneur 9001) ; le réutilise s'il est déjà en cours, exécute docker start s'il est arrêté.
  4. Attend que GET /healthz indique ok.
  5. Extrait un WAV mono 16 kHz de l'entrée avec ffmpeg local (whisper.cpp ne décode que le WAV), puis le POST vers /transcribe avec word_ts=true.
  6. Écrit transcript.txt, transcript.srt, transcript.words.json dans --out (par défaut : le dossier du fichier d'entrée) et imprime une ligne JSON de résultat sur stdout.

Résultats

  • transcript.txt — texte brut.
  • transcript.srt — sous-titres.
  • transcript.words.json — [{ "word", "start", "end" }], en secondes, ordonnés temporellement. C'est la source de synchronisation pour les superpositions/sous-titres.

Ligne de résultat stdout (pour les appelants programmatiques comme /produce-video) :

{ "ok": true, "outDir": "...", "wordCount": 38, "segmentCount": 2, "files": { "txt": "transcript.txt", "srt": "transcript.srt", "words": "transcript.words.json" } }

Prérequis

  • Docker est OBLIGATOIRE — le service Whisper s'exécute dans un conteneur, donc Docker Desktop doit être installé ET en cours d'exécution. Le lanceur vérifie cela en premier et échoue bruyamment avec des conseils d'installation/démarrage si Docker est manquant ou son démon arrêté ; il n'y a pas de solution de repli sans Docker.
  • ffmpeg est OBLIGATOIRE (utilisé pour extraire un WAV mono 16 kHz pour Whisper) — le lanceur le vérifie au début et échoue bruyamment s'il n'est pas sur le PATH.
  • Node ≥ 22.

Notes

  • Le conteneur reste en cours d'exécution (--restart unless-stopped) pour une réutilisation à chaud ; arrêtez-le avec --stop.
  • Si des horodatages mot par mot sont demandés mais qu'aucun n'est renvoyé, le lanceur échoue bruyamment (la synchronisation des superpositions en dépend).
  • Voir references/ pour le cycle de vie Docker, la forme de l'API et la provenance du greffon.

Individual skills in this repo

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

AlemTuzlak/skills

Use when the user wants to write a blog post about a feature, product change, PR, git diff, or any technical topic - accepts marketing briefs, PRs, git refs, codebase paths, or freeform descriptions as input

AlemTuzlak/skills

Use when the user wants to generate a changelog, release notes, or document what changed between versions, tags, or PRs

AlemTuzlak/skills

Use when writing, editing, or organizing documentation, when planning what docs a feature needs, and whenever planning or implementing a new feature or change in a repo (docs ship with the code). Also use when tempted to write docs without showing the discovered readers to the user, without asking for tone, or without loading simple-english and i-have-adhd. Triggers on "write docs for X", "document this feature", "add a guide", "update the docs", "reorganize the docs", "plan feature X", "implement X", or /docs.

AlemTuzlak/skills

Use when a bug is in play: a test fails, CI is red, an API returns the wrong result, a stack trace appears, or the user says it is broken or fix this. Don't use for a new feature with no failure, for types-only work, or for docs.

AlemTuzlak/skills

Use when the user invokes /i-have-adhd, says they have ADHD, or asks for ADHD-friendly output. Also used as a required writing filter by the docs skill. Don't use for marketing copy or after the user says "stop adhd mode" or "normal mode".

AlemTuzlak/skills

Use when a settled change must be turned into an ordered stack of small blocks before anyone implements. Don't use for unsettled intent, typos, comments, formatting, docs-only work, or writing the implementation itself.

AlemTuzlak/skills

Use when the user wants to write a product update email, feature announcement newsletter, or digest email for users or subscribers

AlemTuzlak/skills

Use when the user wants to turn a raw talking-head / screen-share recording into a finished, edited, annotated video plus a full content package. Removes silences, flags mistakes for the user to cut, transcribes, adds transcript-synced overlays (code, on-screen code highlights, word highlights, lists, comparisons, diagrams, section labels, punch-in zooms), renders with original audio, then generates blog/socials/YouTube content. Triggers on "produce a video", "edit my video", "annotate my recording", "/produce-video".

AlemTuzlak/skills

Use when the user runs /prove-it or says prove it, prove the changes, show me in the browser, or asks to prove a UI or API change. Don't use only because the agent is about to say done, for types-only work, or for docs with no behavior to prove.

AlemTuzlak/skills

Use when the user wants to write, draft, or author an RFC (Request for Comments) / technical design doc for a feature, change, or architectural decision. Interactively interviews the user, grounds the proposal in the actual codebase, presents 2-3 concrete API/code-snippet approaches to choose from, then writes a review-ready RFC. Triggers on "write an RFC", "draft an RFC", "RFC for X", "design doc for X", or /rfc.

AlemTuzlak/skills

Use when the user wants to deeply learn a new topic from scratch. Runs a pre-interview (current knowledge, end-goal proficiency, depth, practice load, background, scope), researches online (articles, niche-influencer blogs, canonical docs, subtopic landscape), then produces a structured markdown course with mandatory visual diagrams, evidence-based learning-science features (retrieval practice, spaced callbacks, worked-example fading, concept ledger, jargon gate, analogy hygiene), and a self-contained interactive HTML mini-course. Triggers on /teach-me, "teach me about X", "I want to learn X", "deep dive on X", "create a course on X", "study X with me".

AlemTuzlak/skills

Use when the change intent is already settled and the agent must map what a behavior change touches before an implementation plan or any code. Use for new features, bug fixes, and refactors that move a boundary. Don't use for typos, comments, formatting, lockfile-only diffs, docs with no code, or while the user is still deciding what they want.

AlemTuzlak/skills

Use when the user wants to write a video script for a product demo, feature walkthrough, launch video, or social media video about a feature or product change

AlemTuzlak/skills

Use when the user wants YouTube metadata for a video — a click-worthy title, an SEO/above-the-fold description, tags, and timestamped chapters. Accepts a transcript (ideally timestamped SRT), a topic, a PR, or a freeform description. Used standalone and by /produce-video. Triggers on "youtube title", "youtube description", "youtube chapters", "youtube tags", "youtube metadata", "youtube-copy".

Skills associés