TL;DR
SPIRIT LM is a multimodal foundation language model that seamlessly blends text and speech by training on a single, interleaved token stream. Built by continuously pretraining a 7B LLaMA 2 model on text, speech, and word-level interleaved data, it can fluidly switch between modalities. It comes in a Base phonetic version and an Expressive version that integrates pitch and style tokens, enabling cross-modal generation and few-shot learning while preserving both semantic meaning and emotional expression.
What Problem Does This Paper Address?
Traditional speech-processing systems rely on cascaded pipelines: an Automatic Speech Recognition (ASR) model transcribes speech to text, a text-based Large Language Model (LLM) processes or generates a response, and a Text-to-Speech (TTS) system synthesizes the final audio.
While functional, this approach has a major flaw: text is a lossy intermediate representation for spoken language. It completely strips away prosody—the rhythm, pitch, tone, and emotional nuances that convey meaning in human speech. Conversely, existing "SpeechLMs" trained directly on raw audio tokens often struggle with complex semantics because they lack the massive text pretraining of modern LLMs.
SPIRIT LM addresses this gap by creating a unified, single-stream language model capable of processing and generating both text and speech natively, thereby retaining the semantic power of text LLMs and the expressive capabilities of speech.
Methods
The authors build SPIRIT LM by extending a pretrained 7B LLaMA 2 text model into the speech modality via continuous pretraining.
Tokenization
- Text: Tokenized using standard subword Byte Pair Encoding (BPE).
- Speech (Base Version): Audio is converted into discrete phonetic units using a pretrained HuBERT model, followed by deduplication to compress the sequence length.
- Speech (Expressive Version): To capture how something is said, the authors supplement the HuBERT tokens with two additional token types:
- Pitch Tokens: Extracted from the fundamental frequency ($F_0$) and quantized using a Vector Quantized Variational Autoencoder (VQ-VAE).
- Style Tokens: Extracted using speechprop features clusterized via k-means to capture overall expressive style (e.g., whispering, excitement). These three token types are interleaved chronologically based on their timestamps.
Word-Level Interleaving
For parallel speech-text datasets, the model mixes modalities at word boundaries. During training, a change of modality is randomly triggered, and special tokens ([TEXT] and [SPEECH]) are used to signal shifts to the model. This design preserves the natural right-to-left causality of language across both text and audio.
Decoding
To convert speech tokens back into audible waveforms during inference, the authors train a HiFi-GAN vocoder conditioned on the speech tokens and speaker embeddings.
Datasets
The model was trained on a massive mix of data:
- Text-only: 300B tokens from a speech-related subset of LLaMA's pretraining data.
- Speech-only: 460K hours (~30B tokens) of unlabelled audio.
- Aligned Speech+Text: 110K hours (7B speech tokens, 1.5B text tokens) automatically curated at the word level.
New Benchmark: STSP
To evaluate emotional awareness, the authors introduce the SPEECH-TEXT SENTIMENT PRESERVATION (STSP) benchmark. Built using the EXPRESSO and EMOV datasets, STSP tests a model's ability to preserve a prompt's sentiment (positive, negative, neutral) when generating completions within the same modality or across modalities (e.g., Text $\rightarrow$ Speech).
Key Insights and Ideas
- Interleaving is Crucial for Cross-Modal Alignment: Ablation studies showed that training on speech and text without word-level interleaving significantly degrades cross-modal performance. Interleaving forces the model's internal layers to map spoken and written words into a shared semantic space.
- The Cost of Expressivity: While SPIRIT LM Expressive successfully captures emotion, it performs slightly worse than the Base version on purely semantic or grammatical benchmarks. This is because adding pitch and style tokens increases sequence length, raising the overall modeling complexity.
- Pretrained Text Knowledge Transfers to Speech: A randomly initialized model trained on the same data fails to achieve competitive few-shot performance. Starting from a text-pretrained LLM is essential for the model to successfully apply in-context learning to speech tasks.
Key Results
- Speech Comprehension: On the spoken StoryCloze benchmark, which tests high-level semantic understanding, SPIRIT LM Base achieved an accuracy of 61.0%, comfortably outperforming previous speech-only models like TWIST (55.4%).
- Few-Shot Cross-Modal Tasks: SPIRIT LM demonstrates strong few-shot capabilities for ASR and TTS. When explicitly exposed to parallel ASR/TTS data during training (+ASR+TTS variant), its LibriSpeech ASR Word Error Rate (WER) dropped dramatically from 21.9 to 6.0, and its TTS Character Error Rate (CER) improved from 45.5 to 6.7.
- Sentiment Preservation: On the new STSP benchmark, SPIRIT LM Expressive achieved a zero-shot average accuracy of 0.48, outperforming both the Base version (0.41) and a traditional cascade pipeline topline (0.42). It was particularly dominant in Speech $\rightarrow$ Speech sentiment preservation, scoring 0.54 compared to the cascade baseline's 0.33.
Limitations and Future Work
- Text Degradation: Continuous pretraining on speech caused a slight degradation in text-only capabilities (such as MMLU scores) compared to the original LLaMA 2 model. Finding training recipes that mitigate this "catastrophic forgetting" remains an open challenge.
- Language and Scale Constraints: The current work is strictly limited to English and a 7B parameter model scale. The authors note that scaling beyond 7B and expanding to non-English languages are obvious next steps.
- Safety and Toxicity: SPIRIT LM exhibits higher added toxicity in speech-to-speech tasks than cascaded baselines, likely reflecting biases in the speech training data. Furthermore, its expressive capabilities increase the risk of voice impersonation, highlighting the urgent need for speech watermarking and safety alignment (RLHF) before real-world deployment.
Summary updated