Newer
Older
remotion_docker_devcontainer / voicevox-remotion-template / src / lipsync / getMouthAtTime.ts
import type {JapaneseMouthShape, MouthTimeline} from "./types";

export const getMouthAtTime = (
  timeline: MouthTimeline | undefined,
  seconds: number
): JapaneseMouthShape =>
  timeline?.cues.find((cue) => seconds >= cue.start && seconds < cue.end)
    ?.mouth ?? "rest";