{"id":120731,"plugin_id":"plugin_asdk_app_6ac54d9a866c8191877d60974b7641b3","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-27T12:24:45.348Z","digest":"6b40ed5ebc04fb445adbee5c6f668e6a4f76ef5fb5b9e5921dcd64001f7bb245","against":null,"payload":{"description":"Fix lip sync: repair words a video model (Seedance, Kling, …) said wrong in a talking video, without regenerating it. Asks the video's language and whether the whole clip or only some parts need redoing, clones the speaker's voice into the user's connected ElevenLabs account, voices the corrected words (or the whole script) with ElevenLabs v4 in that voice, plays them back for approval, lip-syncs only the affected seconds with Sync 2 and stitches them back into the original, then loops on further fixes. Use for \"fix lip sync\", \"the actor says the wrong word at 0:04\", \"it says Ableben instead of Abnehmen\", \"re-voice these words\", \"the German/Spanish/French pronunciation is off\", \"redo the voice and lip sync\". NOT for dubbing a video into another language or replacing the whole voice with a different one.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":176},{"relative_path":"references/timeline-editing.md","size_in_bytes":25765}],"name":"fix-lip-sync","skill_md_contents":"---\nname: fix-lip-sync\ndescription: \"Fix lip sync: repair words a video model (Seedance, Kling, …) said wrong in a talking video, without regenerating it. Asks the video's language and whether the whole clip or only some parts need redoing, clones the speaker's voice into the user's connected ElevenLabs account, voices the corrected words (or the whole script) with ElevenLabs v4 in that voice, plays them back for approval, lip-syncs only the affected seconds with Sync 2 and stitches them back into the original, then loops on further fixes. Use for \\\"fix lip sync\\\", \\\"the actor says the wrong word at 0:04\\\", \\\"it says Ableben instead of Abnehmen\\\", \\\"re-voice these words\\\", \\\"the German/Spanish/French pronunciation is off\\\", \\\"redo the voice and lip sync\\\". NOT for dubbing a video into another language or replacing the whole voice with a different one.\"\n---\n\n# Fix lip sync\n\nVideo models get the script order right in other languages but swap single\nwords for look-alikes: \"Abnehmen\" comes out as \"Ableben\", \"bezahlt\" as\n\"beteilt\". Only a fluent speaker hears it. This skill re-voices just those\nwords in the speaker's own cloned voice, lip-syncs just those seconds and\nstitches them back, so the rest of the video stays exactly as it was.\n\n**Needs:** a library video (an `@video:` mention, a `maxfusion_search_assets`\nhit or a generation result), an ElevenLabs account connected in Maxfusion on\nthe Integrations page (never ask for the key in chat), and a Pro or Max plan\nfor the clone.\n\nTools: `maxfusion_clone_voice`, `maxfusion_list_my_voices`,\n`maxfusion_generate_speech`, `maxfusion_lip_sync`, `maxfusion_trim_video`,\n`maxfusion_stitch_videos`, `maxfusion_transcribe_media`,\n`maxfusion_create_timeline`, `maxfusion_read_timeline`,\n`maxfusion_change_timeline`, `maxfusion_get_job` (poll every job).\n\n## 1. Ask two things\n\nAsk both in one message, then wait for the answer:\n\n1. **Which language is the video in?** You write every corrected word in it.\n2. **The whole clip, or only some parts?** For the whole clip: the script as\n   it should be spoken, or the corrections to make. For parts: the second of\n   each wrong word and what it should say (\"0:02 Abnehmen, 0:14 bezahlt\"). For\n   parts, also say that finding the exact timing of the words captions the\n   video once, 5 credits per started 10 s of it, so the answer is their OK\n   for that charge.\n\nA whole clip longer than 120 s cannot be lip-synced in one piece: offer\nparts instead.\n\n## 2. Clone the voice, once\n\n`maxfusion_clone_voice` with `video_id`, `name` \"Lip sync fix <video id>\n<date and time now>\" and `remove_background_noise: true`, and poll the job.\nThen `maxfusion_list_my_voices` with `q` set to the video id until the voice\nof exactly that name shows; a first empty list fills within a minute. Keep its\n`id` as the `voice_id` for every round of this video.\n\n- \"ElevenLabs Not Connected\" or `VOICE_USER_KEY_MISSING`: tell the user to\n  connect ElevenLabs on the Integrations page and stop.\n- Forbidden: cloning needs a Pro or Max plan. Say so and stop.\n- A failed clone job: give the user its error message and stop.\n- `status: needs_verification`: the user verifies the voice in their\n  ElevenLabs account first, then you continue.\n\n## 3a. The whole clip\n\n1. `maxfusion_transcribe_media` (`file_id` the video id,\n   `purpose: \"video_reference\"`) and apply the user's corrections, or take\n   the script they gave.\n2. `maxfusion_generate_speech` with `model: \"tts-v4\"`, the `voice_id` and the\n   script. The lip sync makes the video as long as the speech: longer speech\n   loops the video, shorter speech cuts its end. When `duration_seconds` is\n   longer than the video, or more than 0.2 s shorter, generate it again (takes\n   vary), up to three takes. When none fits, tell the user by how much the\n   video would loop or be cut with the closest take, and offer to edit the\n   script, take it anyway, or fix only the wrong parts.\n3. The result plays in chat. Ask the user to listen, and wait for their OK; a\n   take they reject is generated again.\n4. `maxfusion_lip_sync` with the video, the audio id and\n   `model: \"sync-2-pro\"`. Then step 4.\n\n## 3b. Only some parts\n\n**Word timings.** Caption the video on a timeline that is only a work file.\nEach change goes with the `revision` of your last read as `base_revision`\nand its ops in `ops`; `references/timeline-editing.md` (bundled with this skill) has the details when a call is\nrefused.\n\n1. `maxfusion_create_timeline` with `name` \"Lip sync fix <video id>\" and\n   `media: [{type: \"video\", id}]`; `notice` must say the file was added. Read\n   `section: media` until its `prepare_status` is `ready`. Keep its media `id`\n   and `probe.duration_frames_at_30`, and the `main` layer's id from\n   `section: entities`.\n2. One `maxfusion_change_timeline` that puts it on the `main` layer:\n   `{op: \"create\", type: \"clip\", id: \"e_<10 chars of a-z, 2-7>\", parent_id:\n   <main layer id>, order_key: null, props: {start: 0, duration:\n   <duration_frames_at_30>, x: 0, y: 0, width: 1080, height: 1920, rotation:\n   0, opacity: 100, animation_in: null, animation_out: null, media_id,\n   in_point: 0, speed_q: 4, fit: \"fill\", volume: 100, muted: false,\n   ken_burns_push: null}}`.\n3. A change of its own with only `{op: \"add_captions\"}`. Read\n   `section: media` until `caption_status` is `ready`, then\n   `section: entities`: every caption's `words` are\n   `[{text, start_ms, end_ms}]` in the video's own time.\n\nA `prepare_status` or `caption_status` of `failed`, or captions without\nwords: tell the user what the read says and stop.\n\n**Windows.** For each spot the user named, find the word whose time covers\nthat second, or the nearest one that sounds like the wrong word. Grow it into\na **window**: the whole phrase it belongs to, from the pause before it to the\npause after it, at least the wrong word and its neighbours, 1.5 to 5 s long. A\nsingle word voiced alone sounds cut out; a phrase keeps the melody of the\nsentence. A window starts and ends in the gap between two words, never inside\none: in the middle of a short gap, 0.2 s from the word at a longer pause or\nat the start and end of the speech. Settle every boundary before voicing:\nmerge windows less than 1 s apart, keep them inside the video, and give an\nunchanged stretch shorter than 0.2 s to the window before it (the one after\nit at the video's start). Write each window's text: its caption words with\nthe wrong word replaced, spelled correctly in the video's language.\n\n**Cut.** One `maxfusion_trim_video` of the video with every range in time\norder, the unchanged pieces and the windows together: `[0, w1 start]`,\n`[w1 start, w1 end]`, `[w1 end, w2 start]`, … `[last end, the end]`, leaving\nout a piece of zero length. `result.videos` holds them in that order only when\nit has one clip per range; with fewer, trim again.\n\n**Voice each window.** `maxfusion_generate_speech` with `model: \"tts-v4\"`,\nthe `voice_id` and the window's text, all windows at once. Compare each\n`duration_seconds` with its window clip's `duration`:\n\n- longer: the lip-synced part would loop. Generate it again, or widen the\n  window into the pause before or after it, or by the next word (added to\n  the text).\n- more than 0.2 s shorter: the part would end early and jump. Generate it\n  again, or narrow the window.\n\nWhen a window's bounds change, settle every boundary again and redo the one\ntrim with all the ranges; every piece then comes from the new\n`result.videos`.\n\nThen show the user the windows (\"0:01.6–0:03.4: 'Abnehmen ist ehrlich\ngesagt …'\") and ask them to listen to each take, which plays in chat. Wait for\ntheir OK before the lip sync; a take they reject is generated again.\n\n**Sync and stitch.**\n\n1. `maxfusion_lip_sync` for each window clip with its approved audio and\n   `model: \"sync-2-pro\"`, all at once.\n2. `maxfusion_stitch_videos` with the pieces in time order, each window\n   replaced by its lip-synced video. With only one piece there is nothing to\n   stitch.\n\n## 4. Show it and loop\n\nDeliver the result, list the seconds you fixed and what each now says, and ask\nthe user to watch those spots: did it work, or what else is wrong? Each answer\nstarts another round on the newest video from step 3a or 3b, with the same\nvoice and without asking the two questions again; a parts round captions the\nnewest video on a new work timeline, because its timing changed: name that\ncaption charge again and wait for the user's OK first.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}