Skip to content

fix(cut-paper): no dejar la boca abierta antes de la primera palabra - #408

Merged
IAnMove merged 1 commit into
fix/tijeral-hocus-lipsync-20260912from
cursor/bc-f3deac85-56bb-44ed-ac95-d87c30da95e2-1fd7
Sep 12, 2026
Merged

fix(cut-paper): no dejar la boca abierta antes de la primera palabra#408
IAnMove merged 1 commit into
fix/tijeral-hocus-lipsync-20260912from
cursor/bc-f3deac85-56bb-44ed-ac95-d87c30da95e2-1fd7

Conversation

@cursor

@cursor cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Resumen ejecutivo

Qué cambia

El lipsync alineado ahora deja la boca cerrada desde t=0 hasta la primera palabra, en vez de congelar el primer visema abierto durante todo el silencio previo.

Para qué sirve

En el plano 2 de Tijeral, Nilo se quedaba con la boca abierta 6 s y Berta 17 s antes de hablar. El export Hocus de #407 heredaba ese fallo.

Impacto para el usuario

Play/Export de los planos talk/sticker (ES y EN) ya no muestra bocas abiertas en el silencio. Detectar habla no borra diálogo existente si Whisper no devuelve palabras útiles.

Riesgo

  • Bajo
  • Medio
  • Alto

Estado

  • En desarrollo
  • Listo para revisión
  • Bloqueado por CI o revisión
  • Requiere migración o acción manual

Summary

planAlignedCutoutDialogue emitted a zero-length closed viseme at the first word's start. rebuildCutoutDialogueLayers dedupes by time and keeps the later frame, so the first spoken viseme became the earliest keyframe. evaluateSceneLayer holds that pose for all t ≤ first keyframe — mouths hung open from the start of the shot.

Rest closed now occupies t=0 → first word (distinct timestamps). Compiled Tijeral scenes were regenerated. Detect-from-audio throws instead of applying a dummy t=0 plan when every Whisper unit is empty/whitespace.

Stacked on #407 (fix/tijeral-hocus-lipsync-20260912).

Overview

  1. User opens or exports 02-talk / 03-sticker.
  2. Before: Nilo wide=1 at t=1s (speech at 6s); Berta wide=1 at t=1s (speech at 17s); Kito wide=1 at t=1s (speech at 10s).
  3. After: closed=1 / wide=0 before speech; "La" still opens at t=6.05s.

Detailed changes

Backend

N/A.

UI and Wizard

  • planAlignedCutoutDialogue: rest closed from t=0 when the first word starts later.
  • animateCutoutDialogueFromAudio: require trimmed, timed units before replacing mouth keyframes.

Data, provenance and compatibility

Regenerated bundled Tijeral scene JSON (ES/EN talk, sticker, full pilot). Plaza shots unchanged (no dialogue).

Files and ownership

  • ui/src/lib/cutoutDialogue.ts — planner fix.
  • ui/src/components/Sidebar/SceneAnimatorPanel.tsx — empty-units guard.
  • ui/tests/cutoutDialogue.test.mjs, ui/tests/cutPaper.test.ts — rest-closed assertions.
  • Bundled *.maestro-scene.json — regenerated from the compiler.

Validation

  • Date (UTC): 2026-09-12

  • Base SHA: 3a7dfa6

  • Head SHA: 5e43a48

  • Validation scope: focused

  • python scripts/verify_clean_repo.py

  • python -m compileall -q app/services app/launch.py scripts

  • Focused Python tests: N/A (UI lipsync only)

  • cd ui && npm run i18n:check

  • UI tests: cd ui && npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/cutoutDialogue.test.mjs tests/cutPaper.test.ts — 22/22 pass

  • cd ui && npm run lint -- --max-warnings=0

  • cd ui && npm run build

  • git diff --check — clean

  • E2E/smoke checks: N/A — compiler + evaluateSceneLayer cover the playback hold

Code quality

  • Score: pending CI
  • Complexity trend: pending CI
  • Production LOC trend: pending CI
  • Regression versus main: pending CI
  • Ratchet: pending CI

CI and review

  • CI of this HEAD: pending

  • Independent agent review of this HEAD: pending

  • Human merge click (operational, not code review): pending

  • Reviewed at current HEAD

  • Earlier review; HEAD has changed since (stale)

  • Pending

  • Unavailable

Coste de la tarea

  • Tests simulados: 0 tokens externos
  • Tests reales: N/A
  • Llamadas LLM externas: 0
  • Tokens de prompt: N/A
  • Tokens de respuesta: N/A
  • Tokens totales: N/A
  • Generaciones de imágenes/audio/vídeo: 0
  • Tiempo transcurrido: N/A
  • Proveedores/modelos: N/A

Notes and limitations

Merge after or with #407. Does not change viseme vocabulary (still 4 shapes).

Follow-up work

None.

Checklist

  • The executive summary is understandable without reading the code.
  • The detailed Summary/Overview has not been removed or shortened.
  • Tests and their actual results are recorded.
  • Generated assets, secrets and local-only files are not committed.
  • Required CI and Cursor/Bugbot review are complete, or the PR is clearly marked as waiting for them.
Open in Web View Automation 

A zero-length closed viseme shared a timestamp with the first spoken
word. rebuild kept the later open frame, so evaluateSceneLayer held
that viseme from t=0 (Nilo open for 6s, Berta for 17s). Rest closed
now starts at t=0. Detect-from-audio no longer applies a dummy plan
when every Whisper unit is empty.

Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
@IAnMove
IAnMove merged commit 1f71241 into fix/tijeral-hocus-lipsync-20260912 Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants