Introduction
Room fingerprinting involves analyzing an audio recording to determine the physical characteristics of the environment, such as its volume and shape. This capability is crucial for forensic audio analysis, augmented reality, and acoustic scene reconstruction. While determining these parameters from a Room Impulse Response (RIR) is mathematically straightforward, doing so from a raw speech signal is significantly more challenging. Speech signals are inherently "contaminated" by the speaker's voice and linguistic content, which mask the subtle acoustic cues of the environment.
To address this, we introduce RevRIR, a dual-encoder architecture designed to estimate room parameters directly from speech utterances. By leveraging contrastive learning, RevRIR bridges the gap between speech signals and the acoustic signatures of the rooms in which they were recorded.
Methodology
The RevRIR framework is inspired by cross-modal models like CLIP, aiming to create a shared latent space for reverberant speech and RIRs.
Dual-Encoder Architecture
The system consists of two primary components:
- Speech Encoder: An Audio Spectrogram Transformer (AST) that processes the reverberant speech signal.
- RIR Encoder: A sequence of feed-forward layers that process the log-magnitude of the Fast Fourier Transform (FFT) of the RIR.
Contrastive Pre-training
During the pre-training phase, the model is trained on pairs of speech and RIRs. If a speech sample was simulated within a specific room, its embedding is pushed closer to that room's corresponding RIR embedding. Conversely, embeddings from different rooms are pushed apart. This contrastive loss forces the encoders to ignore "nuisance" variables—such as speaker identity or spoken content—and focus exclusively on the acoustic environment.
Fine-Tuning and Inference
Following pre-training, the RIR encoder is discarded, and a simple linear classification head is attached to the speech encoder. The model is then fine-tuned to classify audio into specific room categories. During inference, only the reverberant speech signal is required to predict the room's characteristics.
Experimental Setup
The model was evaluated using a large-scale simulated dataset:
- Speech Data: 36,000 hours of clean audio from LibriVox and LibriSpeech.
- Acoustic Simulation: 550,000 RIRs generated via simulation across 110 distinct room configurations.
- Room Classes: Configurations were grouped into three main types: Small (16 variations), Large (52 variations), and Hall (42 variations).
Results and Discussion
The RevRIR model demonstrated significant improvements over traditional baselines in identifying room characteristics from speech.
Classification Performance
- 110-Room Classification: The model achieved 60% accuracy on reverberant speech. While challenging, this significantly outperforms the random baseline of 0.9%.
- 3-Room Type Classification: The speech encoder achieved 95.4% accuracy in distinguishing between Small, Large, and Hall environments, outperforming a baseline RIR-feature-based model (85.8%).
Semantic Latent Space
Analysis via t-SNE visualizations indicated that the model's embeddings naturally organize according to room geometry (width and depth). This suggests that the model learns a semantic understanding of room shapes rather than merely memorizing specific instances. Furthermore, the model showed high robustness to variations in speaker identity and content, successfully decoupling the "room" from the "source."
Conclusion
RevRIR presents a novel approach to room fingerprinting by jointly embedding speech and RIRs. By using RIRs as "teachers" during pre-training, the speech encoder learns robust features that are invariant to speaker and content. Future work will focus on evaluating the model's performance in real-world environments with complex geometries and background noise, addressing the current limitation of simulated rectangular room data.
Summary updated