Abstract: Text-to-audio (TTA) systems have recently demonstrated strong performance in synthesizing monaural audio from text. However, the task of generating binaural spatial audio from text, which provides a more immersive auditory experience by incorporating the sense of spatiality, have not been explored yet. In this work, we introduce text-guided binaural audio generation. As an early effort, we focus on the scenario where a monaural reference audio is given additionally. The core problem is to associate specific sound events with their directions, thereby creating binaural spatial audio. The challenge lies in the complexity of textual descriptions and the limited availability of single-source sound event datasets. To address this, we propose AudioSpa, an end-to-end model that applies large language models to process both acoustic and textual information. We employ fusion multi-head attention (FMHA) to integrate text tokens, which enhances the generation capability of the multimodal learning. Additionally, we propose a binaural source localization model to assess the quality of the generated audio. Finally, we design a data augmentation strategy to generate diverse datasets, which enables the model to spatialize sound events across various spatial positions. Experimental results demonstrate that our model is able to put sounds at the specified locations accurately. It achieves competitive performance in both localization accuracy and signal distortion.
1. Introduction
Recent advancements in Text-to-Audio (TTA) models, such as AudioLDM, have enabled the synthesis of high-quality monaural audio from natural language descriptions. However, these systems typically produce "flat" audio that lacks spatial depth. In contrast, human hearing is inherently binaural; we perceive 3D space by processing subtle differences in time and volume between our ears.
Generating spatial audio directly from text remains a significant challenge due to the complexity of multimodal fusion and the scarcity of datasets containing isolated sound events paired with spatial metadata. AudioSpa addresses this gap by focusing on a practical task: given a monaural reference audio clip (containing a target sound and background noise) and a text prompt (e.g., "At 90 degrees, the dog barks"), the system spatializes the target sound while maintaining the natural, omnidirectional characteristics of the background environment.
2. The AudioSpa Architecture
AudioSpa is an end-to-end time-domain waveform mapping model designed to preserve the phase information essential for spatial perception. The system architecture consists of several key components:
- Text Encoding and Fusion: A frozen FLAN-T5 Large Language Model (LLM) extracts features from the text prompt. To avoid the limitations of using a single output token, we introduce Fusion Multi-Head Attention (FMHA). This mechanism intelligently aggregates text tokens into a single conditioning vector, capturing the full context of spatial instructions.
- Acoustic Backbone: The model utilizes 1D convolutional residual blocks to map the input monaural waveform to a binaural output. By operating directly in the time domain, the model can accurately represent Interaural Phase Differences (IPD).
- Feature-wise Linear Modulation (FiLM): The text conditioning vector is injected into the audio network via FiLM layers, which modulate the intermediate features of the residual blocks to guide the spatialization process.
3. Data Synthesis and Augmentation
To overcome the lack of specialized training data, we developed a dynamic data augmentation strategy. We synthesize training samples by:
- Selecting clean monaural sound events from datasets like UrbanSound8K and ESC-50.
- Applying Head-Related Impulse Responses (HRIRs) from the HUTUBS database to place sounds at specific azimuths.
- Mixing these spatialized signals with omnidirectional noise from the DNS5 and WHAM! datasets.
- Generating corresponding text prompts using GPT-4o to describe the resulting scene.
4. Experimental Results
Our evaluation focuses on two primary dimensions: spatial accuracy and signal quality. To measure spatial accuracy, we developed a custom DNN-based binaural source localization model to predict the Direction of Arrival (DOA) of the generated audio.
4.1. Spatialization Performance
In clean environments, AudioSpa achieves exceptional precision, with a DOA Mean Absolute Error (MAE) of just 0.03° and an accuracy of 99.83%. In noisy conditions (0 dB SNR), the model remains robust, maintaining a DOA MAE of 8.00°.
4.2. Impact of Data Augmentation
The proposed on-the-fly data augmentation strategy significantly enhances model performance. As shown in the training curves, the inclusion of diverse augmented data leads to a higher Signal-to-Distortion Ratio (SDR), indicating better preservation of the original audio quality during the spatialization process.
4.3. Ablation Studies
Ablation experiments highlight the importance of the FMHA module. Replacing FMHA with a standard "first token" conditioning approach caused the DOA MAE to increase by 12.3° and accuracy to drop by over 23%. This confirms that spatial instructions require the relational context provided by the entire text prompt.
5. Conclusion and Future Work
AudioSpa demonstrates that text-guided spatialization of sound events is achievable by combining LLM-based text processing with time-domain acoustic networks. The model successfully distinguishes between target events and background noise, spatializing only the former as directed by text.
Future research will focus on expanding the model's capabilities to handle multiple simultaneous sound sources in different locations and moving toward pure text-to-spatial-audio generation without the need for a reference monaural clip. Additionally, integrating visual modalities could allow for automatic alignment of spatial audio with video scenes.
Summary updated