Text-to-Speech as Audio Language Modeling

This article explores how transformer-based autoregressive models like Bark and AudioLM revolutionize text-to-speech (TTS) synthesis by framing speech generation as an audio language modeling problem. Rather than relying on traditional two-stage pipelines that generate intermediate representations like mel-spectrograms, these systems discretize continuous audio waveforms into discrete tokens using neural audio codecs. By organizing these tokens into hierarchical sequences, decoder-only transformers can generate expressive, natural speech, complete with realistic prosody, ambient sounds, and non-verbal vocalizations using standard next-token prediction techniques.

The Paradigm Shift: From Acoustic Features to Audio Tokens

Traditional neural TTS architectures typically decompose speech synthesis into two distinct stages: converting text to intermediate acoustic features (such as mel-spectrograms) via models like Tacotron or FastSpeech, followed by a separate neural vocoder (such as HiFi-GAN) to synthesize raw audio waveforms. While effective, this pipeline often struggles with zero-shot voice cloning, complex acoustic environments, and spontaneous, non-verbal vocal nuances.

Audio language modeling bypasses intermediate continuous representations entirely. It reconceptualizes audio as a sequence of discrete symbols, analogous to words or subword units in natural language processing (NLP). By compressing continuous audio into discrete representations using deep neural codecs, systems like Bark and AudioLM treat speech generation identically to text generation: predicting the next token in a sequence conditioned on preceding context.

Discretizing Audio with Neural Codecs

To treat audio like text, continuous 1D audio signals must be transformed into a compact, discrete token space. This is achieved using neural audio codecs, predominantly based on Residual Vector Quantization (RVQ), such as SoundStream or EnCodec.

The Hierarchical Architecture of AudioLM and Bark

Generating high-fidelity audio autoregressively presents a dimensional challenge: processing hundreds or thousands of tokens per second rapidly exhausts the context window of standard transformers. To mitigate this, models employ a hierarchical, multi-stage autoregressive framework.

The AudioLM Approach

AudioLM structures the generation process into three sequential stages, factorizing the joint probability distribution of the speech tokens:

  1. Text/Audio to Semantic: The model maps the input prompt to a sequence of semantic tokens, capturing the broad linguistic content and structure.
  2. Semantic to Coarse Acoustic: A transformer conditions on the generated semantic tokens to predict the first few levels of the RVQ acoustic codebook. These coarse acoustic tokens capture speaker identity, fundamental frequency (\(F_0\)), and general tonal characteristics.
  3. Coarse to Fine Acoustic: A final non-autoregressive or masked language model conditions on the coarse acoustic tokens to predict the remaining fine RVQ levels. Fine tokens represent high-frequency details that do not require long-term context, making fully autoregressive generation unnecessary at this stage.
  4. Decoding: The final token streams are passed directly into the neural codec's decoder to reconstruct the raw continuous waveform.

The Bark Approach

Suno's Bark utilizes a conceptually similar multi-tiered transformer structure that operates over EnCodec token streams:

  1. Text to Semantic: A GPT-style transformer converts input text tokens directly into high-level semantic tokens (often quantized from HuBERT-like feature spaces).
  2. Semantic to Coarse Acoustic: A second transformer generates the first two codebooks of EnCodec tokens based on the semantic sequence. This step determines voice characteristics, emotion, timing, and non-verbal vocalizations (such as laughing, sighing, or gasping).
  3. Coarse to Fine Acoustic: A third transformer (typically an autoregressive or sequence-to-sequence model) expands the two coarse codebooks into the full eight codebooks required by EnCodec.
  4. Waveform Synthesis: The full set of quantized acoustic vectors is fed into the EnCodec decoder to output the finished waveform.

Autoregressive Generation and In-Context Learning

By adopting the standard decoder-only transformer architecture (identical to models like GPT-4), audio language models inherit fundamental properties of large language models:

Key Trade-offs

While audio language modeling delivers unprecedented naturalness and zero-shot voice cloning capabilities, it introduces specific engineering trade-offs compared to non-autoregressive TTS systems: