Direct System Audio API Access #2606
Labels
category: new feature
Substantive changes that add new functionality. https://www.w3.org/policies/process/#class-4
Needs Reporter Feedback
The issue needs feedback from the reporter. https://speced.github.io/spec-maintenance/about/
Priority: Eventually
"nice to have". https://speced.github.io/spec-maintenance/about/
size: L
Large amount of work expected to resolve.
💡 Describe the feature
I would like WebAudio to provide a way for web applications to access the underlying system’s native audio APIs—such as CoreAudio (macOS), WASAPI (Windows), and ALSA (Linux)—directly from within the browser. This would allow web applications to bypass the latency and limitations introduced by the browser’s sandboxing mechanisms and leverage the full power of the system’s audio capabilities.
🔧 Is there a prototype?
While there is no direct prototype that accesses native APIs due to sandbox restrictions, existing AudioWorkletNode implementations can demonstrate the need for further optimization when working with real-time audio processing. These implementations, even with low-latency settings and WebAssembly integration, show measurable latency (6-10ms or higher) that could be eliminated with direct access to system audio APIs.
📋 Describe the feature in more detail
🔌 Native API Hooks: Expose hooks to native audio APIs in the WebAudio API, which could be enabled with user permissions similar to how
getUserMedia
works for microphone and camera access. This would be particularly useful for professional-grade real-time audio applications, such as live autotune, low-latency voice communication, or music production tools.🎛️ Selective Native Access: Allow web applications to selectively bypass WebAudio processing for critical audio paths, such as real-time input/output streams. For example, developers could choose whether to process audio in the browser or hand it off directly to the native audio system, depending on the use case.
⏱️ Latency Reduction: The primary goal is to reduce the 6-10ms of browser-added latency. Direct access to system APIs would enable sub-5ms latency, which is crucial for professional real-time audio processing applications (e.g., autotune, live mixing, and real-time voice processing).
🔒 Security Considerations: The system access could be gated behind user permissions, similar to how browsers handle access to hardware like microphones and cameras. Ensuring that this feature does not compromise security while allowing developers greater control over audio processing is critical.
This feature would elevate WebAudio's capability for real-time DSP by allowing web apps to match the performance of native audio applications, making the web a viable platform for professional-grade audio tools.
Thanks for your attention and have a great day! 🎉
The text was updated successfully, but these errors were encountered: