Can Large Language Models Understand Spatial Audio?

Changli Tang, Wenyi Yu, Guangzhi Sun, Xianzhao Chen, Tian Tan, Wei Li, Jun Zhang, Lu Lu, Zejun Ma, Yuxuan Wang, Chao Zhang

Abstract

This paper explores enabling large language models (LLMs) to understand spatial information from multichannel audio, a skill currently lacking in auditory LLMs. By leveraging LLMs’ advanced cognitive and inferential abilities, the aim is to enhance understanding of 3D environments via audio. We study 3 spatial audio tasks: sound source localization (SSL), far-field speech recognition (FSR), and localisation-informed speech extraction (LSE), achieving notable progress in each task. For SSL, our approach achieves an MAE of 2.70° on the Spatial LibriSpeech dataset, substantially surpassing the prior benchmark of about 6.60°. Moreover, our model can employ spatial cues to improve FSR accuracy and execute LSE by selectively attending to sounds originating from a specified direction via text prompts, even amidst overlapping speech. These findings highlight the potential of adapting LLMs to grasp physical audio concepts, paving the way for LLM-based agents in 3D environments.

Introduction

While multimodal Large Language Models (LLMs) have become adept at understanding text, images, and general audio (such as identifying a dog barking or transcribing clear speech), they remain largely "direction-blind." They struggle with spatial auditory perception—the ability to determine where a sound originates in a 3D environment.

In the real world, humans use binaural hearing to navigate "cocktail party" scenarios, focusing on one speaker while ignoring background noise based on location. For LLM-based agents to function effectively in 3D spaces—such as robots or AR assistants—they must bridge this gap. This research addresses three specific challenges:

  1. Sound Source Localization (SSL): Pinpointing the azimuth and elevation of a sound.
  2. Far-field Speech Recognition (FSR): Transcribing speech accurately despite distance and room reverberation.
  3. Localization-Informed Speech Extraction (LSE): Extracting and transcribing a specific speaker's voice based on their direction, even amidst overlapping speech.

Methodology

The proposed system integrates a frozen Whisper speech encoder with a Vicuna-7b LLM, connected by a window-level Q-Former modality aligner.

The model architecture integrates spatial Intensity Vectors (IVs) with audio features before the Q-Former aligner.

The core innovation is the inclusion of Intensity Vectors (IVs) derived from B-format multichannel audio to provide raw spatial information. The researchers evaluated two fusion strategies:

  • "Before" Option: Concatenating spatial IVs with audio features before the Q-Former aligner.
  • "After" Option: Adding spatial information after the aligner, just before the LLM.

The "Before" approach proved significantly more effective, likely because it enables the aligner to learn a joint representation of semantic content ("what") and spatial location ("where"). Interestingly, the researchers found that the LLM's native understanding of numbers outperformed the use of specialized "angle tokens."

Experimental Setup

The study utilized two primary datasets:

  • Spatial LibriSpeech: A benchmark of spatially augmented synthetic speech with a single source.
  • DSS LibriSpeech (Dual-Source Spatial): A new dataset introduced in this work, created using the Soundspaces 2.0 simulator and Matterport3D environment meshes to simulate realistic 3D rooms with two overlapping speakers.

Key Results and Discussion

The integration of spatial cues yielded substantial improvements across all tasks.

Comparison of Sound Source Localization (SSL) performance across different fusion methods and benchmarks.
  • State-of-the-Art Localization: On the 3D SSL task, the model achieved a Mean Angular Error (MAE) of 2.70°, a significant improvement over the previous benchmark of 6.60°.
  • Enhanced Recognition: For far-field speech, the Word Error Rate (WER) decreased from 9.0% to 7.6% with the addition of spatial intensity vectors.
  • Neural Beamforming via Prompting: The model successfully acted as a "spatial filter." When prompted (e.g., "Please transcribe the speech on your right"), it isolated and transcribed the target speaker with over 80% success in dual-speaker scenarios.

These results suggest that LLMs are already "math-literate" enough to handle spatial coordinates without specialized vocabulary. Furthermore, spatial information doesn't just assist in localization; it improves semantic accuracy by helping the model filter out environmental "smearing" like echoes.

Conclusion

This work demonstrates that LLMs can be adapted to understand physical audio concepts, enabling "spatial hearing." While performance degrades as speech overlap increases toward 70%, the results pave the way for more capable LLM agents in 3D environments. Future research will explore real-world performance with physical microphone arrays and adaptation to common formats like standard binaural audio.

Summary updated

BibTeX
@inproceedings{tang2024can,
  author = {Changli Tang and Wenyi Yu and Guangzhi Sun and Xianzhao Chen and Tian Tan and Wei Li and Jun Zhang and Lu Lu and Zejun Ma and Yuxuan Wang and Chao Zhang},
  title = {{Can Large Language Models Understand Spatial Audio?}},
  booktitle = {Interspeech},
  year = {2024},
  url = {https://openreview.net/forum?id=Nz1CEy5ZBw},
}
Figure