Talking Head Skill v1
A real digital human talking-head video production workflow for ordinary users: the user only provides their photo, a voice recording, a room scene, and a product screen recording. The agent guides them step-by-step to create a horizontal talking-head video within 3 minutes.
Suitable for: Website introductions, product introductions, pure talking-head. Not suitable for: Cartoon character explanations.
Supporting files (in the user's talking-head-skillv1 folder): references/branch-product.md (product introduction branch), references/branch-talk.md (pure talking-head branch), references/style-library.md (visual style library S1–S20, each with color palettes), references/motion-library.md (motion template library M01–M66), references/visual-templates.md (visual template directory), tools/ (one-click installation, self-check, make_sfx.py sound effect synthesis, render.ps1 one-click render), koubo-remotion/ (editing template), examples/ep3_favorites_Main.tsx, examples/ep4_templates_Main.tsx (motion and style template implementation, with color table TPAL/PALS), koubo-presets.json (style presets).
General Principles
- Confirm step by step: Follow the stages below in order. At each stage, first show the user a sample (audio preview, effect image, test clip). Only proceed to the next step after the user gives their approval. If the user hasn't confirmed something, do not claim it as "completed."
- Don't skip the process: For every video and every revision, start by selecting the video type, then confirm stage by stage in order: Type → Materials → Script → Visual template proposal and keyframes → Sample clip → Voice preview → Digital human test clip → Edit preview → Final video. Even if the user requests many changes, pushes for speed, or says "just generate it," do not skip steps, merge steps, or render the full video before getting confirmation. The same applies to revisions: for script changes, first present the script; for visual changes, first present the keyframes or sample clip. When a preset exists, use it as the default, but still present and wait for user confirmation.
- Confirm and save: Every time the user confirms a style (script tone, voice, scene, digital human expression, visual template, editing style), immediately write it into the style preset file. The next production should first ask, "Would you like to reuse last time's [style]?"
- Quote before spending: Before any task that generates a cost (voice preview, digital human test clip, redo), clearly state: service name, model, duration or word count, number of times, unit price basis, and estimated amount. If the unit price is unknown, write "Unknown, based on console deduction," not 0. Proceed only after the user agrees. After completion, distinguish between estimated and actual usage.
- Visual templates must be reviewed first (hard requirement): Before generating or rendering any video, first show the visual template to the user (keyframes, plus a 10-to-15-second sample clip). Only render the full video after explicit user approval. This applies to new videos, revisions, or even small adjustments; if the user says "just generate it" or "don't show me," do not skip this step (you can make keyframes quicker and fewer, but you must still provide them).
- After optimization, still provide examples for selection: When the user requests optimization of templates, styles, or aesthetics, do not directly apply them to the video. Instead, remake all optimized candidates into playable examples (style template page: each template with a motion effect preview, can be enlarged), let the user select again, and then continue.
- Promotion matches reality: The processes, interfaces, and features shown in the video must be those the user actually used and are real; simulated interfaces must be based on real conversations and real pages, not drawn with non-existent buttons and windows.
- Each template comes with color palette options: Each visual template must have at least 3 color palettes (5 for tech categories). On the style template page, allow preview switching with color blocks. The user selects "template + color palette."
- Preview, don't render formally: Only produce low-cost previews (720p, compressed) during template selection and color palette selection phases. Clearly label the page with "Preview version, not formally rendered. Quality based on final output." Formal rendering only happens in the final video after user confirmation.
- Seek novelty, not inertia: For each new video, re-recommend styles and color palettes based on the current content. Do not default to the previous video, nor default to the user's website or brand colors. Among the recommended candidates, at least half must be styles or color palettes not used in the last 3 videos, and mark them in the options as "recently used." Auxiliary elements like interface illustrations, transition pages, cards, and subtitle highlights should also follow the current content's chosen style, not a fixed color set. Only use presets when the user explicitly says "reuse last time."
- Test a small segment first: For any paid generation, first only produce the opening segment for the user to review. Confirm the effect before proceeding with batch production.
- Only modify affected parts: If the user changes one sentence, only redo the voiceover for that sentence and the corresponding digital human segment. Reuse other segments by shifting them along the new timeline.
- Facts based on materials: Function names, data, button names can only come from the user's screen recording, website, and original statements. When the user says "word for word, no changes," use the exact wording. Do not fabricate functions, data, or effects.
- Keep credentials private: Use the user's API keys only in requests. Do not print, log, or include them in delivery files. Do not log in or fill in passwords for the user.
- Final video must not exceed 180 seconds, verified against the actual audio/video timeline.
- Visual quality must be high-end: Follow the standards of "Stage 3.5" for colors, textures, and borders. Prefer restraint over flashiness.
- Vary motion effects: Within a single video, alternate multiple motion effects from the template directory (3D carousel, jigsaw puzzle, path highlight, card flip, folder expand, number scroll, progress ring, 3D browser mockup, spotlight, magnifying glass, split-screen comparison, word-by-word bounce-in with light sweep). Do not use the same one for two consecutive segments. The frame can be rich in information, but make the focus immediately clear: one subject, one highlight, and the rest weakened as auxiliary layers.
- Use premium transitions: Between segments, use shape mask reveals, zoom-throughs, 3D flip cards, light-sweep advances, angled split screens, page turns, etc. Do not use only fades or hard cuts for the entire video, and do not add whoosh sound effects to transitions.
- Examples must be functional: When mentioning styles, templates, or features, create at least 2 complete, interactive example pages. Do not just display name cards. The example topics should be unrelated to the user's own website or product, unless the user requests otherwise.
Stage 0: Preparation & API Integration
Before starting work, guide the user through API integration. For each service, tell the user: service name, model, purpose, required credentials, and billing method.
Have the user write all credentials into a file api.txt (or a separate txt) in the working folder, one per line, e.g., ElevenLabs: sk_xxx. After the user saves it, the agent reads it and performs a free connectivity test. The connectivity test must never generate paid content.
A. ElevenLabs (Voice Cloning and Voiceover, Recommended)
Purpose: Clone the user's voice to generate expressive, rhythmical voiceovers. Real-world testing shows superior emotional expressiveness compared to Volcengine's voice cloning.
- Open the official website elevenlabs.io and sign up (do not use third-party resellers).
- Upgrade to the Starter plan (approximately $5/month, includes instant voice cloning; the free plan cannot clone).
- Bottom left avatar → API Keys → Create. The full key starts with
sk_and is only shown once during creation; what you see in the list is the Key ID, which cannot be used. - At minimum, assign permissions: Text to Speech (Access), Voices (Write), Models (Read), User (Read).
- Save to file:
ElevenLabs: sk_.... - Connectivity test:
GET https://api.elevenlabs.io/v1/user/subscription(request headerxi-api-key). Returns plan and remaining character quota.
Common errors: api_key_id_used_as_api_key indicates a Key ID was used instead of the full key; missing_permissions means permissions were not checked. Edit the Key's permissions without recreating it.
B. Volcengine OmniHuman 2.0 (Photo + Audio → Digital Human Video)
Purpose: Generate a talking digital human video (720P) from a driving image and a voiceover.
- Enable the "Intelligent Vision / Jimeng Digital Human" related services on the Volcengine console. Confirm OmniHuman 2.0 is available and the account has sufficient balance.
- In Access Control, create a sub-user and AK/SK. Grant visual service permissions. Save to file:
Access Key ID: ...andSecret Access Key: .... - Invocation method:
https://visual.volcengineapi.com, ActionCVSync2AsyncSubmitTaskto submit,CVSync2AsyncGetResultto query, Version2022-08-31,req_key=realman_avatar_picture_omni20_cvtob. AK/SK uses HMAC-SHA256 signature (regioncn-north-1, servicecv). - Input: The driving image uses
binary_data_base64(less than 4.7MB); the audio must be a publicly accessible MP3 URL, therefore an object storage service is required (see C). - Connectivity test: Query the status endpoint with a non-existent task_id. An
Access Deniederror means the service is not enabled or permissions are missing. Ask the user to check the service status, permissions, and balance on the console. - Pricing: Domestic unit prices are often not found. Refer to the overseas listed price of approximately $0.07/second, based on actual console deductions.
Alternative: HeyGen (Avatar IV/6/V) has been tested. Avatar IV is cheaper but mouth movements and head movements do not meet requirements. Avatar 6/V is more expensive per unit than OmniHuman. Not recommended by default. Only integrate when the user explicitly requests it, and store the rules separately so they do not interfere with OmniHuman setup.
C. Volcengine TOS (Object Storage, for Providing Audio Links to OmniHuman)
- Enable TOS and create a private bucket (e.g., in cn-beijing). Grant the sub-user read/write permissions to a specific directory within the bucket.
- Upload audio and generate pre-signed URLs valid for 1 to 2 hours to provide to OmniHuman.
- If the sub-user can only access their own directory,
Access Deniedfrom ListBuckets is expected and normal.
D. Optional: Volcengine Voice Cloning / Doubao Speech
Can use Volcengine's voice cloning (resource seed-icl-2.0, requires explicit selection of seed-tts-2.0-expressive for emotion control). Real-world testing shows the cloned voice has lower emotional range, and speeding it up makes it sound robotic. ElevenLabs is the default recommendation; if the user insists on using Volcengine, clearly explain this limitation.
E. Local Tools (One-Click Installation Script)
Required tools:
- ffmpeg
- Python: opencv, mediapipe (for portrait matting), praat-parselmouth (for pitch analysis), faster-whisper (for word-level timestamps, includes approximately 500MB model), numpy, scipy, requests
- Node.js LTS and Remotion 4.0.546 (editing and rendering)
- Google Chrome (use
--browser-executableto point to it during rendering) - Linux additionally requires Noto CJK fonts
The installation package exceeds 1GB and is not bundled with the skill. Instead, provide one-click installation scripts in the tools/ folder. All files are downloaded from official sources:
- Windows: Right-click
install-windows.ps1→ "Run with PowerShell". If execution is restricted, runpowershell -ExecutionPolicy Bypass -File install-windows.ps1. - macOS: Execute
bash install-mac.shin the terminal. - Linux: Execute
bash install-linux.sh.
The script will, in order: install Python packages; pre-download the whisper model; install Remotion in koubo-remotion/; and finally run a self-check (check.ps1 / check.sh), displaying [OK] or [MISSING] for each item. Total download is approximately 1.5GB, taking 10 to 30 minutes.
Agent's approach: Before starting work, ask the user to run the self-check. If anything is missing, only install the missing components. When the agent creates content in a cloud environment, it installs according to the same checklist.
Stage 1: Define Goals
Use options to clarify the following: Category (website introduction, product introduction, pure talking-head); Aspect ratio (default 16:9 horizontal); Target duration (≤180 seconds); Target audience and purpose; Digital human presence budget (in seconds or monetary amount).
If there is a saved style preset, ask, "Would you like to reuse the previous style?" and list the preset names for the user to choose. For episodic videos (sequels), reuse the same preset and start with a sequel-like tone.
Branch by Category
After the category is selected, Stage 2 (Materials), Stage 3 (Script), Stage 3.5 (Visual Templates), and Stage 7 (Presence Strategy) should be executed according to the category. Voice, background, driving image, editing, and rendering are common across all three types.
- Website Introduction: This is the main flow of this document (screen recording or screenshots, plus a 3D browser mockup).
- Product Introduction (Physical Product): Read
references/branch-product.md. Key points:- Materials should include white-background multi-angle shots, detail macro shots, usage scenarios, hands-on real-photos, size references, and specification sheets.
- The digital human must not pick up or operate the product: First preference is for the user's hands-on footage; second is to provide a reshoot checklist. Only as a last resort, use a user-specified video generation model (Seedance 2.0 mini) to supplement shots. Must quote first, test only 1 shot, check the product appearance frame by frame, and label it "Illustrative image."
- Visuals should use 2.5D parallax rotation, exploded views with component labels, feature highlight animations, spec cards, and size comparisons. After matting the product, unify lighting and add contact shadows.
- Compliance: Do not use superlative terms. Claims about efficacy must be substantiated. Clearly state that pricing is based on the page. Do not name competitors. Only use parameters from the specification sheet.
- Pure Talking-head: Read
references/branch-talk.md. Key points:- Split the script into parts "where the viewer must see you speaking" (hooks, core arguments, conclusions, most emotionally charged sentences) and parts "to be expressed through visuals" (quotes, steps, comparisons, numbers, experiences).
- For the latter, use text animations, path highlights, split-screen comparisons, number scrolls, and slow zooms on real photos. Do not use AI-generated fake photos to represent experiences.
- The digital human should occupy 30% to 50% of the total video length. For any single continuous appearance exceeding 12 seconds, insert at least one text animation in between.
- When quoting, present two options side-by-side: "More digital human presence" and "Digital human plus motion effects."
Stage 2: Collect Materials (Provide clear shooting/recording instructions for each item)
- Front-facing photo (Driving image): Face the camera directly, framing from head to chest/shoulders. Both shoulders and arms must be fully visible, not cut off by the photo border. Lighting should be even. Expression should be relaxed. Wear a solid-color top.
- Voice recording: A 1 to 3 minute recording of natural speech. Do not read from a script. The environment should be quiet, with only the user's voice. English is also acceptable.
- Background (Room): Take a photo from the position where the phone is placed while speaking, horizontally, showing the area behind you. The lens should be at eye level (sitting down). A video recorded while walking around can also be used, but details will be softer.
- Product screen recording or screenshots: 1080p. Navigate through functions in order, pausing on each button for 1 to 2 seconds. Screenshots alone can also be used (with a 3D mockup and zooming in). The agent will crop out the address bar and blur personal information (invitation links, email addresses, etc.). Missing interface screens can be simulated based on the actual style, but must be clearly labeled "Interface Illustration."
Stage 3: Script
- First, write it in a conversational tone: Short sentences, like introducing something to a friend. Avoid a manual-like or slogan-like tone.
- Within the first 3 seconds, provide a hook that the rest of the video can deliver on.
- Button names, function names, and text on the interface must be word-for-word consistent.
- When the user provides a complete presentation script, condense it into a talking-head script. It doesn't need to be identical, but all statements must be based on the original script (do not exaggerate or fix duration, word counts, retention periods, etc.).
- The user's original statements should be used verbatim. Sentences added by the agent must be clearly marked for user approval. When mentioning other products, frame it as personal experience (e.g., "In my experience using..."). Do not name or disparage specific products.
- After the script is confirmed, save it as a "Script Tone" preset.
Stage 3.5: Visual Templates (Present with the Script for User to Choose)
When presenting the script for user confirmation, also present 2 to 3 visual template proposals. Each proposal must be customized for the current content and user materials, not a fixed template. See references/visual-templates.md for the complete template directory, selection rules, and code key points.
Always let the user choose a style (style specifications are in references/style-library.md):
- Style Library S1–S8:
- S1 Paper Feel Light Color · Glass & Ceramic
- S2 Financial/Educational Hand-drawn Style
- S3 Flat Illustration Style
- S4 Whiteboard/Blackboard Handwriting Style
- S5 Pixel Art Style
- S6 Magazine/Collage Style
- S7 Tech HUD Style
- S8 Anime/Manga Style (characters and scenes require AI generation; quote first)
- Options when presenting the script: Recommend 2 to 3 single styles based on content and materials, plus an "AI Auto-Chosen Mix-and-Match" option. The user can also request any single style by name.
- AI Auto-Chosen Mix-and-Match Rules:
- One primary, one secondary: Primary style occupies about 70%, determining the background color, font, and subtitles. Secondary style is used for only 1 to 3 paragraphs as memory anchors (e.g., calculations with hand-drawn, experiences with collage, "I see!" moments with pixel art upgrade).
- For the secondary style segments, replace its colors with the primary style's color palette, borrowing only its texture and motion effects.
- Transition between styles using masks or page turns.
- A maximum of two styles. Clearly explain why this combination was chosen.
- After selection, write into the preset's
visual_template.style(e.g.,S1orS1+S5).
Each proposal must clearly state 6 items:
- Style name and one-sentence character (e.g., "Paper Feel Light Color · Glass & Ceramic").
- Color palette: Background color, primary color, one accent color, using color values. Explain where they come from (e.g., "Taken from the website interface").
- Texture and borders: Frosted glass, ceramic, graphite, jade, etc. Thin borders with inner highlights, corner radius size.
- Motion effect list: Which line of dialogue gets which motion template (e.g., "s02: 'In my experience using software...' → 3D carousel + jigsaw puzzle mismatch").
- Sound effects: By default, use only click sounds. Do not add "whoosh" sounds to transitions. To add music, it must be provided by the user or from a licensable source.
- Digital human appearance duration and cost: After replacing some appearances with motion effects, how many seconds does the digital human appear, and what is the estimated cost? Compare this with a version without motion effects.
How to choose based on content and materials:
- Color palette follows the product: Light-colored product interfaces get a light cream or sage background. Dark-colored products get a dark background. Do not let large areas of pure black surround a light interface; users will find it oppressive.
- Has real screen recordings: Use a 3D browser mockup to display the recording. Has only screenshots: Use a mockup with zoom-in and spotlight.
- Script discusses pain points, comparisons, or competitors: Use 3D carousel, jigsaw puzzle mismatch, balance scales, crossing out and rewriting. All competitors should be fictional (e.g., "App A–H"); do not use real names or logos.
- Script discusses processes or series: Use path highlights, card flips, folder expands.
- Materials have numbers or achievements: Use number scrolls, progress rings, bar chart growth. Only use numbers that actually exist in the materials.
- Simulated interfaces: Must be labeled "Interface Illustration" in the upper right corner.
- In a single video, use major motion effects (carousel, jigsaw, path) a maximum of 2 to 3 times. Use mockups with spotlights for the rest.
Hard standards for high-end visual quality:
- Color palette: One primary color and one accent color. Use neutral colors for the rest. Do not use multiple saturated colors.
- Texture: Front face with a gradient and a diagonal highlight. Sides have depth and shading. Contact shadow underneath. Overall, apply a soft light, a very subtle film grain, and a slight vignette (darkening edges).
- Borders: 1px semi-transparent thin border with 1px inner highlight. Rounded card corners 16–34px. Shadows should be large and soft, with a tint of the primary color, not pure black.
- Subtitles: Light background: dark text with a white soft glow stroke. Dark background: white text. Keywords use one shade darker than the primary color.
- 3D scenes: Define depth using transparency and lighting. Do not add blur filters to 3D sub-elements, as it disrupts the front-back layering.
First, produce 4 to 10 keyframes, then a 10 to 15 second sample clip. After the user confirms the style, render the entire video. After user selection, save it as a "Visual Template" preset. Write every user comment about color, texture, and sound effects into the preset's avoid list to automatically avoid them in the future.
Stage 3.6: Motion Effect Selection (Mandatory Two-Round Modal, After Style Selection, Before Rendering)
Regardless of how urgent the user is or how many times they've revised, these two rounds must be presented using modal popups for the user to select each item. They cannot be skipped, and the agent cannot make the decision directly. Each option must be previewable: motion effects with playable short videos, sound effects with playable audio. Previews should be placed together on a "Motion Template Page" (720p, labeled "Preview version, not formally rendered"). Each tab should clearly state the number, name, visual description, suitable dialogue, and duration. User can check boxes and copy selections.
First Round · Expression Methods (Using references/motion-library.md categories 1–6: Comparison/Transition, Process/Path, Quantity/Results, Interface Operations, Emphasizing Quotes, Atmosphere Shots)
- Identify all nodes in the final script that need visual expression. For each node, write "Which line of dialogue → What needs to be expressed."
- For each node, present a modal popup with 3 most suitable candidates (with number, name, and a one-sentence visual description) plus an "AI Auto-Match" option. The modal's built-in "Other" option allows the user to write their own prompt. Ask a maximum of 4 questions per round, dividing into several rounds.
- When the user provides their own prompt, implement it according to the description, and first provide keyframes for confirmation.
Second Round · Intro/Outro, Transitions, Sound Effects (Category 7 transitions M51–M62, Category 8 intro/outro M63–M66, sound effect library)
- Intro/Outro: Provide options plus "AI Auto-Match."
- Transitions: Options include "Use one style for the whole video," "Select per segment," or "AI Auto-Match." The same transition can be used a maximum of 3 times.
- Sound effects: Select after previewing from the sound effect library (click, light flick, ding, stamp, paper, page turn, typewriter, bass hit, etc.), or choose "No sound effects." The user has already expressed dislike for transition whooshes, so do not use them by default.
After both rounds are complete, write the results into the preset's motions and sfx fields. Write user dislikes into the avoid field. Then produce keyframes and a sample clip, go through the "Visual templates must be reviewed first" checkpoint, and render the full video only after user approval.
Sound effect files are in koubo-remotion/public/sfx/, synthesized by tools/make_sfx2.py, no copyright issues.
Stage 4: Voice (ElevenLabs Workflow)
- Clone Voice
- API:
POST /v1/voices/add, multipart upload multiple clean recordings, withremove_background_noise=true. - Before uploading, apply local noise reduction: high-pass 75Hz, remove 50/100/150Hz hum, afftdn noise reduction, normalize loudness.
- You can clone two versions simultaneously and let the user decide which sounds more like them.
- API:
- Generation Method (This step determines if the voice sounds human)
- Use model
eleven_v4,language_codeset tozh, API endpoint/v1/text-to-speech/{voice_id}/with-timestamps. - Generate in chunks of 1 to 2 sentences, with identical settings for each chunk:
stability, fixedseed,previous_text,next_text. Do not generate the entire video at once (voice drift, sounds like voice change). - Emotion tags should only use mild terms, e.g.,
[conversational],[calm],[warm],[honest, gentle]. Do not use[excited],[laughs]. - Do not speed up the voice: Speeding up makes it sound robotic.
- Use model
- Provide A/B options for the user to choose the style: Subtle version (stability 0.7), Previous version (0.5). If the user says "in between," provide 0.6 with mild emotion tags.
- Quality Control
- Use parselmouth to calculate the median pitch for each chunk. If a chunk deviates more than ~15% from the overall median, regenerate with a different seed.
- Compress pauses longer than 0.55 seconds within a chunk to about 0.45 seconds. Leave 0.45 to 0.5 seconds between chunks.
- Use faster-whisper to transcribe and verify: emotion tags are not spoken, text matches exactly. For words suspected of being mispronounced, regenerate with a different seed and compare.
- After user confirmation, save the "Voice" preset.
Stage 5: Background Scene
- Do not change lighting: Keep the room's original lighting.
- Ensure perspective is realistic: First, ask about the actual layout, then determine the blur amount based on distance.
- Only use objects that actually exist in the room. Reference images are for composition only.
- When materials are insufficient: Use real textures from the room video to reconstruct according to the user's described layout. Honestly inform the user it is reconstructed and recommend a reshoot.
- Provide two images: A layout image without blur and a composite image with the person.
- After user confirmation, save the "Scene" preset.
Stage 6: Driving Image Composition
- Use mediapipe to extract the person, then fill the edges with the person's internal colors.
- Arms cut off by photo border: First, fit a smooth curve along the outer contour of the arm, then extend the arm out of the frame following the curve. Do not create sharp angles.
- Add a generic chair back if needed.
- Do not change the composition without asking. If you need to zoom in or crop, ask the user first.
- After user confirmation, save the "Driving Image" preset.
Stage 7: Digital Human (OmniHuman)
- Only generate segments where the person needs to appear.
- Reduce cost with motion effects: For sentences expressing transitions, comparisons, or conclusions, prioritize using motion effect visuals from Stage 3.5. Generally, only have the digital human appear for the opening hook, a transition sentence, and the closing sentence, totaling about 20 seconds or less. If the user provides an upper limit, follow theirs.
- If a digital human segment is too short (less than 3 seconds), fill it with silence to reach 3 seconds. Do not carry over audio from the next sentence.
- Test the opening segment first. Quote the cost, get user confirmation, then proceed with batch generation. If the script might still change, do not submit the closing segment. Promptly cancel any outstanding old versions of submitted but not yet generated tasks.
- Recommended settings: Use a prompt that is a single positive sentence: "Naturally and relaxed chatting to the camera, with a gentle expression." For the audio sent to the digital human service, compress it and reduce gain by 6dB. The final video will still use the original voiceover.
- Audio trimming method: Cut from "0.15 seconds before the start of the sentence" to "about 0.2 seconds after the end of the sentence." Shorter than 3 seconds will result in a 50200 error.
- Task rules: Only 1 task can be run simultaneously. If a 50430 error occurs, queue and retry. Download links are valid for 1 hour. Tasks that have been submitted but polling stopped will still incur charges. Use a continuation query script to retrieve results by
task_id. Do not resubmit. - Quality control (frame-by-frame spot check): Shoulders with no gray lumps or white spots. Neck with no muscular pulsing. No persistent pouting or wide eyes. Hands should not cover the face (hands that move after speaking must be cut before they move). Background must not be distorted. Lip sync must be accurate.
- After user confirmation, save the "Digital Human" preset.
Stage 8: Editing (Remotion)
- Word-level timeline: Use faster-whisper to transcribe the final voiceover, then use difflib to align the script word-by-word. Generate subtitles based on manually determined phrase breaks, using the original script text.
- Composition rules: Colors, textures, and motion effects must follow the user's chosen visual template (Stage 3.5). General rules:
- Person full-screen: Opening hook, transition sentences, closing sentence.
- Screen recording segment: Place inside a 3D browser mockup (slightly tilted, alternating left/right, start with a blurry zoom-in and a light sweep; leave the address bar empty). Add a top chapter navigation bar with progress.
- Word-to-image synchronization: When the script mentions a specific button, the frame should zoom in on that button at that exact moment, with the button lighting up in the primary color ring and accompanied by a light click sound. To emphasize an area, use a spotlight (dimming the surrounding area).
- Cards: Frosted glass, spring curve ease-in about 0.45 seconds. Maximum of 1 card on screen at a time. Do not block the person's face or the button being discussed.
- Subtitles: No bottom bar. Light background: dark text with a white soft glow. Dark background: white text.
- Sound effects: Use
tools/make_sfx.pyto synthesize. Default is click sounds only. No transition sounds.
- Common pitfalls:
- After changing the voiceover, first copy the new audio file into the editing project and verify the duration and timeline alignment before rendering. Otherwise, the end will be silent and subtitles will be out of sync.
- The start frame for each video segment must be >= 0. The global start point for a digital human segment is the audio's in-point.
- Card and animated counter animations use local time within the segment.
- Pre-export checks: Loudness at -14 LUFS.
blackdetectshows no black frames.silencedetectshows no unexpected silence longer than 1.2 seconds. Transcribe and check the end. Spot-check frames. Ensure address bars, invitation links, and email addresses are blurred. - After user confirmation, save the "Editing Style" preset.
Where to Render and How to Speed It Up
- Prioritize rendering the final version on the user's own computer: Remotion uses multiple Chrome instances to render frames simultaneously. Speed is mainly determined by the number of CPU cores, followed by the GPU. Cloud workstations often have only 2 cores and no GPU. A 2-minute final video with 3D motion effects can take about 30 minutes to render in the cloud, while the user's local machine usually takes a few minutes.
- The agent only renders low-resolution previews and keyframes on the workstation. After user confirmation, package the project into the user's folder and provide a one-click rendering script
tools/render.ps1(automatically sets concurrency to half the thread count and enables GPU). - Command:
npx remotion render src/index.ts Main out.mp4 --concurrency=<N> --gl=angle. - Concurrency N: Start with half the number of logical processors. Each concurrent process uses approximately 1GB of RAM. For hybrid CPUs (e.g., 10 cores, 16 threads), use 8. If unsure, run
npx remotion benchmark src/index.ts --concurrencies=6,8,12 --frames=0-300to test. --gl=anglemakes Chrome on Windows use the GPU for 3D and effects. Encoding is not the bottleneck.
- The agent only renders low-resolution previews and keyframes on the workstation. After user confirmation, package the project into the user's folder and provide a one-click rendering script
- When rendering on the workstation is necessary: Render in segments using
--frames=a-b --muted(each segment within 10 minutes to avoid background timeouts). Render the audio track separately with--codec=wav. Use ffmpeg concat for lossless merging, then merge the audio track and apply loudnorm. Verify the total frame count and spot-check each splice point. - Performance tips: Use pre-generated PNG film grain, not real-time SVG feTurbulence. Minimize use of
backdrop-filter. Usedrop-shadowandbox-reflectonly in motion effect segments.
Stage 9: Revision Loop
- If the user points out "at second X, something is wrong," only redo that specific part: changing one line of script only requires regenerating that line's voiceover and shifting the timeline. Changing the composition only requires redoing the driving image and affected segments. Changing the visuals only requires modifying the editing code, without regenerating voiceover or digital human.
- Quote before each redo. For tasks with no cost, state clearly: "Local rendering, no cost incurred."
Style Presets (Save after Every Confirmation)
Maintain a koubo-presets.json file in the user's working folder, storing multiple presets by name. Example structure:
{
"presets": {
"Example Preset - Sitting - Gentle": {
"script_tone": "Conversational, short sentences, hook + function + closing reminder, no slogans",
"voice": {"provider": "elevenlabs", "voice_id": "...", "model": "eleven_v4", "stability": 0.6, "tags": ["conversational", "calm", "warm"], "seed": 7, "pause_max_s": 0.45},
"scene": {"layout": "<Your scene description>", "blur": 10, "lighting": "Original light"},
"driver_image": "drive.jpg",
"avatar": {"model": "omnihuman-2.0", "prompt": "Naturally and relaxed chatting to the camera, with a gentle expression", "drive_audio": "acompressor+(-6dB)"},
"visual_template": {"name": "Paper Feel Light Color · Glass & Ceramic", "bg": "#FBFAF5→#D9E0D3", "accent": "#5E9A4E", "point": "#B08A45", "materials": ["Frosted glass", "Ceramic", "Graphite", "Jade"], "motions": ["3D browser mockup", "Spotlight", "3D carousel + jigsaw", "Path highlight"], "sfx": "Click sounds only", "avatar_budget_s": 20, "avoid": ["Large areas of pure black background", "Multiple saturated colors", "Transition whoosh sounds", "White subtitles on light background"]}
}
},
"last_used": "Example Preset - Sitting - Gentle"
}
Rules:
- Each time the user confirms a stage (saying "OK / that's it / fine"), write the settings for that stage into the current preset, and inform the user "Saved as [name]."
- The next time work starts, first read this file and ask the user which preset to use. The chosen settings serve as defaults for each stage, but the stages still need to be presented in order and await user confirmation. Do not skip them. When asking "Which preset to use," the first option should be "Don't use a preset; make new recommendations based on this video's content."
- Presets should not store API keys.
Delivery
Deliverables: Final video MP4 (1080p, -14 LUFS); Final voiceover and timeline JSON; Script; Style preset file; Editing project and render.ps1 (if user needs to render locally).
The final message should explain: what was changed, what checks were performed, what known minor issues remain, and the cost for this time (estimated vs. actual).