Spatial Audio in WebXR

My Bachelor's thesis project focused on evaluating and comparing different spatial audio technologies within WebXR environments to enhance immersion and user experience in browser-based VR applications.

Bachelor ThesisVRSpatial Audio
2 min read
Spatial Audio in WebXR

Image Credit: Alberto Boem & Samuele Mazzei

Situation

Spatial audio is a critical component for achieving immersion in Virtual Reality (VR), yet its implementation within WebXR (browser-based VR) remained relatively unexplored and fragmented. Developers lacked empirical data to determine which open-source audio tools provided the best sound localization accuracy without compromising performance or user comfort on standalone headsets.

Task

The objective was to design and develop a controlled experimental framework to perceptually evaluate and compare the effectiveness of various spatial audio technologies. The project aimed to provide evidence-based guidance for HCI practitioners and developers on selecting the most performant audio engines for immersive web applications.

Action

  • System Development: Built a WebXR application using A-Frame (Entity-Component-System architecture) and Astro, featuring a spherical array of 42 virtual speakers distributed in an ambisonic-like structure.
  • Technical Implementation: Integrated and compared three primary spatialization methods: Web Audio API PannerNode (HRTF), PannerNode (equalpower), and Google Resonance Audio.
  • HCI Research Methodologies: Conducted a within-subjects experimental study (n=12) to measure user performance and subjective experience.
  • Data Collection & Metrics: Developed a real-time data logging system that captured angular error (azimuth/elevation), success rates, and response times, storing results via a Supabase S3-compatible bucket.
  • Standardized Assessments: Employed industry-standard HCI tools to evaluate the user experience, including the NASA Task Load Index (NASA-TLX) for cognitive workload and the Simulator Sickness Questionnaire (SSQ) to monitor participant well-being.

Result

  • Empirical Discovery: Demonstrated that PannerNode with HRTF significantly outperformed alternatives in localization accuracy, particularly for back-positioned and elevated sound sources.
  • User Comfort Validation: Proved that sophisticated spatial audio techniques improved performance without increasing cognitive workload or simulator sickness, confirming the feasibility of advanced audio in web browsers.
  • Impact: Established a reproducible evaluation framework and provided a technical benchmark that assists developers in creating more immersive and accessible VR experiences across various hardware platforms.

Boem, A., Mazzei, S., & Turchet, L. (2025, September). Spatial Audio for WebXR: Perceptual Evaluation of Sound Localization Technologies on the Browser. In 2025 Immersive and 3D Audio: from Architecture to Automotive (I3DA) (pp. 1-9). IEEE.

Read the Full Paper