Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
alphaonedev avatar

Spatial Audio

  • 48 installs
  • 6 repo stars
  • Updated March 13, 2026
  • alphaonedev/openclaw-graph

spatial-audio is a Claude Code skill that implements HRTF-based 3D audio positioning and rendering for immersive AR/VR experiences.

About

spatial-audio is a skill that implements 3D audio positioning and rendering for immersive AR/VR experiences using Head-Related Transfer Function (HRTF) techniques. It positions sound sources in real time, supports occlusion and reverberation, and integrates with Unity and WebXR. A developer uses it when building virtual tours, games, or simulations where sound direction and distance matter.

  • Real-time HRTF-based 3D audio rendering for AR/VR
  • Handles up to 32 concurrent sources with occlusion and reverberation
  • Integrates with Unity AudioListener and WebXR AudioContext

Spatial Audio by the numbers

  • 48 all-time installs (skills.sh)
  • Ranked #905 of 1,335 Generative Media skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

spatial-audio capabilities & compatibility

Requires a $SPATIAL_AUDIO_API_KEY for the OpenClaw spatial-audio API.

Capabilities
spatial audio · hrtf rendering · 3d sound positioning · audio occlusion
Use cases
frontend
Pricing
Bring your own API key
From the docs

What spatial-audio says it does

This skill implements 3D audio positioning and rendering for AR/VR applications, using techniques like Head-Related Transfer Function (HRTF) to simulate spatial sound sources in real-time.
SKILL.md
Real-time HRTF-based audio rendering for accurate 3D positioning.
SKILL.md
Multi-source handling, supporting up to 32 concurrent audio sources per session.
SKILL.md
npx skills add https://github.com/alphaonedev/openclaw-graph --skill spatial-audio

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs48
repo stars6
Last updatedMarch 13, 2026
Repositoryalphaonedev/openclaw-graph

What it does

Add real-time 3D positional audio to AR/VR experiences using HRTF rendering.

Who is it for?

Adding realistic 3D positional audio to AR/VR games, tours, and simulations.

Skip if: 2D audio needs, where it adds unnecessary overhead.

When should I use this skill?

You need real-time 3D positional audio in an AR/VR application.

What you get

The skill renders HRTF-based 3D audio that tracks source and listener positions in real time.

  • Rendered 3D positional audio

By the numbers

  • Up to 32 concurrent audio sources per session
  • 20Hz-20kHz frequency range
  • 5 key capabilities listed

Files

SKILL.mdMarkdownGitHub ↗

Purpose

This skill implements 3D audio positioning and rendering for AR/VR applications, using techniques like Head-Related Transfer Function (HRTF) to simulate spatial sound sources in real-time.

When to Use

Use this skill when building immersive AR/VR experiences that require realistic audio, such as virtual tours, gaming environments, or simulations where sound direction and distance enhance user presence. Avoid it for 2D audio needs, as it adds overhead for non-spatial applications.

Key Capabilities

  • Real-time HRTF-based audio rendering for accurate 3D positioning.
  • Support for dynamic sound source updates, including occlusion and reverberation effects.
  • Integration with AR/VR frameworks for device-specific audio output (e.g., headphones or spatial speakers).
  • Configurable parameters like sound attenuation models (inverse distance or logarithmic) and frequency ranges (20Hz-20kHz).
  • Multi-source handling, supporting up to 32 concurrent audio sources per session.

Usage Patterns

Always initialize the audio context first, then set up sound sources with positions. Use a loop for updates in real-time applications. For CLI, pipe audio files through the tool; for API, call endpoints in sequence. Pattern: Import library > Create audio context > Add sources > Render and update. Handle cleanup on exit to free resources.

Common Commands/API

Use the OpenClaw CLI for quick prototyping or the REST API for programmatic control. Authentication requires setting $SPATIAL_AUDIO_API_KEY as an environment variable.

  • CLI Command: Render audio with positioning

spatial-audio render --input audio.wav --position 1.5 2.0 3.0 --hrtf default --output rendered.wav This processes an audio file at the specified 3D coordinates.

  • API Endpoint: Create a sound source

POST to https://api.openclaw.ai/spatial-audio/sources with JSON body: { "sourceId": "src1", "position": [0, 0, 5], "audioUrl": "s3://bucket/audio.mp3" } Response includes a source handle for updates.

  • Code Snippet (Python): Initialize and position audio
  import openclaw.spatial_audio as sa  
  context = sa.init(hrtf='default')  
  source = sa.add_source(context, position=[1, 2, 3])  
  sa.update_position(source, [4, 5, 6])  
  • Config Format: JSON for API configs, e.g.,

{ "hrtfProfile": "custom", "attenuation": "inverse", "maxSources": 16 } Load via CLI: spatial-audio config load --file config.json.

Integration Notes

Integrate by adding the OpenClaw SDK as a dependency (e.g., pip install openclaw-sdk or via npm for JS). Set $SPATIAL_AUDIO_API_KEY before runtime. For AR/VR frameworks, wrap in Unity's AudioListener or WebXR's AudioContext—e.g., in Unity, attach the SpatialAudio component to the main camera. Ensure audio devices are compatible; check for Web Audio API support in browsers. For multi-platform, use abstraction layers like Three.js for web-based AR.

Error Handling

Always check return codes or exceptions for errors. Common issues: Invalid positions (e.g., NaN values) return error code 400; audio device unavailability raises "DEVICE_NOT_FOUND". Handle with try-except blocks:

try:  
    sa.render(context)  
except sa.AudioError as e:  
    if e.code == 400:  
        print("Invalid position; correct coordinates.")  

For CLI, parse stderr output (e.g., "Error: HRTF not loaded—use --hrtf flag"). Retry transient errors like network failures with exponential backoff.

Example 1: Basic Spatial Audio Setup in AR App

To set up 3D audio for an AR object: 1. Initialize context: sa.init(hrtf='builtin') 2. Add a sound source: source = sa.add_source(context, position=[0, 1, 2], audioUrl='object_sound.mp3') 3. In the main loop, update based on user position: sa.update_position(source, user_coords) 4. Render: sa.render(context) This creates a sound that moves relative to the user in an AR scene.

Example 2: Dynamic Audio in VR Simulation

For a VR game with moving sound sources: 1. Use CLI for prototyping: spatial-audio render --input explosion.wav --position 10 0 0 --hrtf custom 2. In code (e.g., JavaScript):

   const context = await sa.init();  
   const source = await sa.addSource(context, { position: [5, 0, 0] });  
   setInterval(() => sa.updateSource(source, [Math.random()*10, 0, 0]), 1000);  

3. Integrate with VR framework to sync with head tracking for immersive effects.

Graph Relationships

  • Related Cluster: ar-vr (e.g., shares dependencies with "ar-rendering" skill).
  • Inbound Links: Depends on "audio-processing" for base audio handling.
  • Outbound Links: Enhances "vr-interaction" by providing spatial feedback.
  • Cross-Skill: Integrates with "3d-visualization" for synchronized audio-visual experiences.

Related skills

FAQ

What technique does it use for 3D audio?

It uses Head-Related Transfer Function (HRTF) to simulate spatial sound sources in real-time.

How many audio sources can it handle?

It supports multi-source handling of up to 32 concurrent audio sources per session, with occlusion and reverberation effects.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.