arXiv:2610.29434cs.SDOct 2026

Manuscript Offprint

arXiv:2610.29434

RubatoCodec: Budgeted Adaptive Speech Tokenization with Streaming Decoding

Chihiro Arata, Shohei Taniguchi, Gouki Minegishi, Kan Hatakeyama-Sato

Abstract

Neural speech codecs provide discrete tokens for speech generation. Lower frame rates shorten token sequences, but each token must then carry more linguistic and acoustic information. Variable-frame-rate codecs address this trade-off by adapting token allocation to speech content, but threshold-based allocation lets content determine the token count, so the sequence length a speech generator must produce varies across utterances and datasets at a fixed setting. We present RubatoCodec, a variable-frame-rate speech codec built on X-Codec-2 with an exact utterance-level event budget and streaming decoding. Its Adaptive Firing mechanism uses changes in codec features and waveform spectra to divide speech into variable-duration events without a learned boundary predictor. Discrete codes and an explicit duration represent each event, allowing a speech generator to predict and decode one event at a time. Controlled experiments show that adaptive allocation outperforms fixed-rate coding in reconstruction fidelity and intelligibility at low event rates. A model trained on large-scale multilingual speech achieves competitive reconstruction quality across English, Japanese, and Mandarin, with the best intelligibility preservation among the compared codecs on the evaluated English and Japanese benchmarks at comparable bitrates. In a matched text-to-speech comparison, the adaptive representation yields lower WER and higher UTMOS and UTMOSv2 with comparable speaker similarity. The speech generator also learns the codec's utterance-level event budget without an explicit generation-time rate constraint. These results demonstrate that budgeted adaptive speech representations support both high-quality reconstruction and streaming text-to-speech generation. Code and weights are available at https://github.com/third-intelligence/RubatoCodec and https://huggingface.co/third-intelligence/RubatoCodec.

1 Introduction

Neural speech codecs encode waveforms as discrete tokens for reconstruction [1–3] and language-model-based generation, including AudioLM [4], VALL-E [5], and recent synthesis and spoken dialogue systems [6–9]. For generation, the codec’s frame rate determines the temporal sequence length: ten seconds of speech requires 500 positions at 50 Hz. Lower rates shorten this sequence but require each position to represent a longer acoustic interval. Recent tokenizers operate at 12.5 Hz [6, 8, 9], where each token spans 80 ms. At this resolution, where boundaries fall relative to speech content matters: a fixed grid can merge a rapid phonetic transition into a single token while spending as many tokens on a pause as on the transition.

Speech is temporally nonstationary: pauses and steady vowels change slowly, whereas transitions change rapidly. Variable-rate representations and variable-frame-rate codecs exploit this by assigning different durations to frames [10–15]. Threshold-based allocation, however, lets content determine the frame count, so rates vary

Third Intelligence

across utterances and datasets at a fixed setting [14, 15]. For example, one released threshold-based codec ranges from 46.1 to 81.5 events/s under a single threshold across our five evaluation datasets (Section 5.4.1). Calibrating the threshold on representative data can match an average rate, but it neither fixes the count for an individual utterance nor preserves that average when the data distribution shifts. Sequence length, and with it downstream modeling cost, then cannot be determined from audio duration alone. An explicit event budget removes this dependence: placement adapts to content, while utterance duration determines the sequence length.

Prescribed-count segmentation has been explored in codecs and speech representation methods [11, 12, 16]. We build on this principle with a codec that uses a deterministic firing signal to allocate events, learns duration-aware representations of those events, and decodes them causally.

RubatoCodec separates the number of events from their placement. A retention ratio RR fixes the number of events for TT latent frames at K=round(RT)K = \text{round}(RT) (Section 3.3.2), and Adaptive Firing places them by cumulative allocation of a signal derived from latent dissimilarity and waveform spectral flux, without a learned boundary predictor. The default R=0.25R = 0.25 yields 12.5 events/s on average from a 50-Hz latent grid, with variable event durations. The name reflects the musical term rubato: local timing flexes while the overall tempo is preserved.

RubatoCodec builds on X-Codec-2 [7], retaining its acoustic/semantic encoder and spectral synthesis backbone while introducing adaptive aggregation and causal decoding. Each event carries discrete codes and an explicit duration, allowing a downstream model to predict and decode completed events incrementally. We evaluate the design through controlled codec comparisons, multilingual reconstruction, and downstream TTS training.

Our contributions are:

  1. Budgeted content-adaptive speech tokenization. Adaptive Firing combines an exact utterance-level event budget with cumulative allocation driven by latent dissimilarity and waveform spectral flux. An onset-anchored aggregator combines frame features and duration within each event to construct its quantizer input. Event boundaries require neither a learned boundary predictor nor rate-penalty optimization.

  2. Controlled analysis of adaptive allocation. Matched comparisons show reconstruction gains over fixed-rate downsampling at low event rates, and a placement-only comparison indicates that content-adaptive boundaries contribute to these gains. We also characterize how event rate and quantizer depth trade off at matched bitrates.

  3. A code-duration interface for streaming generation. Each event carries semantically supervised codes and an explicit duration, which a causal decoder renders as they become available. Large-scale multilingual evaluation shows competitive reconstruction quality, including the best intelligibility preservation among the compared codecs on the evaluated English and Japanese benchmarks at comparable bitrates. In matched TTS training, the representation yields lower WER and higher UTMOS and UTMOSv2 scores with comparable speaker similarity, and the generator learns the codec's utterance-level event budget without an explicit rate constraint.

References (60)