Manuscript Offprint

arXiv:2609.02367

The Missing Temporal Link: Temporal Context Routing for Script-Driven Audio-Video Generation

Yichen Liu, Quanwei Zhang, Haozhe Wang, Donghao Zhou, Xiaojie Li, Yang Shi, Jiaming Liu, Ruihua Huang, Yingtian Zou, Daquan Zhou

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Joint audio-video generation models have made substantial progress in visual quality and audiovisual synchronization. However, they still provide limited control over when shot transitions occur and dialogue is spoken. This limitation constrains their application in script-driven content creation, where timing errors can undermine narrative coherence and the viewing experience. Current joint generators align video and audio representations on a shared temporal axis, yet the precise timing of shots and dialogue specified in a structured prompt is encoded only in the prompt's text representation and remains unaligned with the temporal coordinates of either modality. Consequently, video and audio may remain synchronized with each other while both fail to follow the script timeline. This mismatch motivates us to extend temporal alignment beyond video and audio to include the structured script. We therefore introduce Temporal Context Routing (TCR), which maps the script timing onto the shared temporal axis of video and audio generation and routes each prompt's guidance to the corresponding positions in both modalities. Compared with the baseline on 200 test scripts, TCR reduces Shot Boundary MAE by 96%, from 1.11 s to 0.042 s, and raises Dialogue Acc@0.5 s from 28.3% to 84.1%. TCR achieves these improvements while maintaining visual quality and audio-visual synchronization comparable to those of the baselines. A user study further shows that participants prefer TCR on all five evaluated dimensions.

Project page: https://github.com/DAGroup-PKU/Temporal-Context-Routing

1 Introduction

Joint audio-video generation has advanced rapidly, with recent models capable of synthesizing high-quality visual and acoustic content jointly from text prompts (Ruan et al., 2023; Kondratyuk et al., 2024; Liu et al., 2026a; HaCohen et al., 2026; Low et al., 2025; Li et al., 2026b). As these capabilities mature, generative video is moving beyond isolated clip synthesis toward structured content-production workflows. One emerging direction is script-driven generation, which supports narrative video creation for applications such as short-form drama and advertising (Tencent Hunyuan Team, 2026; Zhou et al., 2026b). Unlike conventional generation from a single text prompt (Team Wan et al., 2025), script-driven generation represents a scene as a structured prompt comprising multiple shot descriptions and dialogue lines. As illustrated in Figure 1(a), an original screenplay is first converted into this structured representation, which then guides the joint generation of video and audio.

Script-driven generation differs from conventional text-conditioned generation not only in how its input is organized, but also in the temporal control needed to realize that structure in the generated output. Each shot or dialogue prompt must guide both modalities during its designated time span (Tencent Hunyuan Team, 2026). Current joint generators align video and audio representations on a shared temporal axis (Wang et al., 2024; Liu et al., 2026a; HaCohen et al., 2026), yet encode script-specified shot and dialogue timing only in text, without explicitly associating each prompt with the corresponding temporal positions in either modality. Although video-focused methods have explored when local text prompts should influence video generation (Yan et al., 2025; Wu et al., 2025b; Shu et al., 2026), they do not address how a structured script should jointly control video and audio. Consequently, the two modalities may remain synchronized with each other while jointly deviating from the script timeline, with shot transitions and speech occurring at the wrong times, as illustrated in Figure 1(b). Our central insight is therefore to extend temporal alignment beyond video and audio to include the structured script, representing the timing of each prompt as an explicit control signal aligned with the temporal coordinates of both modalities.

(a) An LLM first grounds a screenplay in time, then structures it for generation

Figure

(b) Text-encoded timing leads to temporal drift; TCR follows the requested timeline.

Figure

Figure 1: (a) An LLM converts an original screenplay into a structured prompt that organizes references, global context, shots, and dialogue together with their precise timing. (b) When script timing is encoded only in text, the generated cuts and speech fail to follow the requested timeline (red), whereas TCR follows the requested shot and dialogue timing more closely. Shot Boundary MAE is measured in seconds; lower is better.

Realizing this control poses three challenges. First, shot and dialogue prompts may occupy distinct, partially overlapping time spans and must therefore remain independently controllable. A dialogue prompt may, for example, remain active across a shot boundary. Consequently, the two prompt types cannot be forced to share a single temporal segmentation. Second, learning this control requires fine-grained annotations of both shot boundaries and dialogue spans, whereas the initial annotations provide only coarse timing. Third, improving temporal accuracy must preserve the visual quality and audiovisual synchronization of the underlying joint generator. Together, these challenges motivate two complementary components: TCR for independent temporal control while preserving visual quality and audio-visual synchronization, and a coarse-to-fine data construction pipeline for refined temporal supervision.

TCR realizes our central insight by mapping each prompt's specified timing onto the shared temporal axis of video and audio generation and routing its guidance to the corresponding positions in both modalities. It computes a duration-normalized routing score over temporal positions for each prompt and adds it as a bias to the video-text and audio-text cross-attention logits during both training and inference. This per-prompt additive design enables independent control of overlapping shot and dialogue prompts without modifying the original text, query, or key representations, helping preserve the visual quality and audio-visual synchronization of the underlying generator. To provide the fine-grained supervision required by TCR, we further develop a coarse-to-fine data construction pipeline that builds multi-shot clips with dialogue spanning shot transitions. Gemini supplies semantic annotations and coarse timing under our predefined script schema, which are subsequently refined using detected visual cuts and word-level speech alignment. The final shot and dialogue annotations are rounded to a 0.1 s grid.

We evaluate TCR on a test set of 200 scripts in two complementary settings: an end-to-end comparison with existing open-source joint generators and a controlled comparison with alternative temporal operators implemented on the same backbone. In the end-to-end comparison, TCR achieves the lowest shot-boundary error and the highest dialogue-timing accuracy among all evaluated systems. Compared with the strongest open-source baseline, it reduces Shot Boundary MAE by 96%, from 1.11 s to 0.042 s, and increases Dialogue Acc@0.5 s from 28.3% to 84.1%, while maintaining competitive visual quality and audio-visual synchronization. In the controlled comparison, where only the temporal operator is varied, TCR reduces Shot Boundary MAE by more than 60% relative to each of the two temporal baselines and again achieves the highest Dialogue Acc@0.5 s. An ablation using coarse instead of refined timing annotations substantially degrades both shot and dialogue accuracy, confirming the importance of the data construction pipeline. A user study further shows that TCR is preferred on all five evaluated dimensions: shot timing, dialogue timing, script fidelity, audio-visual synchronization, and overall quality.

Our main contributions are summarized as follows:

  • We identify a temporal gap in script-driven generation: video and audio may remain mutually synchronized yet fail to follow the script timeline. Our key insight is to extend their temporal alignment to the structured script, making each prompt's specified timing an explicit control signal for both modalities.

  • We introduce Temporal Context Routing (TCR), which maps script timing onto the shared video-audio temporal axis and independently routes each prompt's guidance. We also develop a coarse-to-fine pipeline that builds multi-shot clips, uses Gemini under our predefined schema for semantic annotations and coarse timing, and refines shot and dialogue timing on a 0.1 s grid.

  • We evaluate TCR on 200 test scripts. Compared with the strongest open-source baseline, TCR reduces Shot Boundary MAE by 96%, from 1.11 s to 0.042 s, and raises Dialogue Acc@0.5s from 28.3% to 84.1%, while maintaining competitive visual quality and audio-visual synchronization. A user study further shows that TCR is preferred across all five evaluated dimensions.

References (63)