Streaming Generation for Music Accompaniment

Yusong Wu, Mason Wang, Heidi Lei, Stephen Brade, Lancelot Blanchard, Shih-Lun Wu, Aaron C. Courville, Cheng-Zhi Anna HuangarXiv 2025 · OpenReview

Abstract

Music generation models can produce high-fidelity coherent accompaniment given complete audio input, but are limited to editing and loop-based workflows. We study real-time audio-to-audio accompaniment: as a model hears an input audio stream (e.g., a singer singing), it has to also simultaneously generate in real-time a coherent accompanying stream (e.g., a guitar accompaniment). In this work, we propose a model design considering inevitable system delays in practical deployment with two design variables: future visibility $t_f$, the offset between the output playback time and the latest input time used for conditioning, and output chunk duration $k$, the number of frames emitted per call. We train Transformer decoders across a grid of $(t_f,k)$ and show two consistent trade-offs: increasing effective $t_f$ improves coherence by reducing the recency gap, but requires faster inference to stay within the latency budget; increasing $k$ improves throughput but results in degraded accompaniment due to a reduced update rate. Finally, we observe that naive maximum-likelihood streaming training is insufficient for coherent accompaniment where future context is not available, motivating advanced anticipatory and agentic objectives for live jamming.

Introduction

While modern AI can generate high-fidelity music, most models operate "offline," requiring the entire input (e.g., a vocal track) before generating an accompaniment. In a live "jam session," an AI must respond immediately. The core challenge is latency: audio I/O, model inference, and rendering create a delay. To sound "on time," the AI must predict its accompaniment slightly ahead of the latest audio processed, creating a "recency gap" where the model lacks the most immediate musical context, often leading to rhythmic and harmonic dissonance.

Methodology: Streaming Design Space

We formalize real-time accompaniment as a streaming chunked prediction problem defined by two primary variables:

  1. Future Visibility ($t_f$): The time offset between the AI’s output and the latest input heard. A negative $t_f$ indicates the AI is "predicting ahead" to compensate for system lag.
  2. Output Chunk Duration ($k$): The length of audio generated per inference step. Larger chunks increase throughput but reduce reactivity.
The streaming design space illustrating generate ahead ($t_f < 0$), on time ($t_f = 0$), and behind ($t_f > 0$) scenarios.

The architecture utilizes a LLaMA-style Transformer decoder operating on compressed audio tokens from the Descript Audio Codec (DAC). To minimize latency, we employ a "delay pattern" for Residual Vector Quantization (RVQ) levels, staggering the prediction of audio details to allow faster emission.

Experimental Setup

Models were trained on the Slakh2100 dataset, containing 145 hours of multi-track MIDI-rendered music. This setup allows for mixing random input tracks (e.g., drums/bass) and tasking the AI with generating a coherent target track (e.g., guitar).

Key Insights and Results

Our evaluation using COCOLA (coherence), Beat $F_1$ (alignment), and FAD (quality) reveals several critical trade-offs.

The Performance Cliff

A sharp drop-off in musical quality occurs when the model is forced to predict ahead ($t_f \le 0$). As shown in the metrics below, coherence (COCOLA) and rhythmic alignment (Beat $F_1$) plummet as $t_f$ becomes negative. With $t_f = -1$ second, performance reaches the "random pairing" floor, indicating the AI is no better than an unrelated track.

Evaluation metrics across future visibility ($t_f$), highlighting the sharp decline in COCOLA and Beat Alignment as $t_f$ approaches and crosses zero.

The Chunking Paradox

Increasing chunk size ($k$) improves computational stability and throughput, making the system easier to run on standard hardware. However, it degrades quality because the AI becomes "deaf" to human input for the duration of the chunk, reducing its ability to react to sudden musical changes.

Discussion and Future Work

Standard supervised training is insufficient for live settings because it assumes a complete history. In reality, the most recent notes—often the most critical for synchronization—are missing due to latency. Future work should move toward:

  • Anticipatory Models: Architectures designed to forecast human musical intent to bridge the recency gap.
  • Agentic Objectives: Moving beyond next-token prediction toward Reinforcement Learning or objectives that reward "co-adaptation" between human and AI.
  • System Optimization: Engineering the inference stack to support smaller chunk sizes ($k$) without sacrificing stability.

Summary updated

BibTeX
@misc{wu2025streaming,
  author = {Yusong Wu and Mason Wang and Heidi Lei and Stephen Brade and Lancelot Blanchard and Shih-Lun Wu and Aaron C. Courville and Cheng-Zhi Anna Huang},
  title = {{Streaming Generation for Music Accompaniment}},
  year = {2025},
  eprint = {2510.22105},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.22105},
}
Figure