Multiple Signal Types
MLS (Maximum Length Sequence), logarithmic chirp sweep, and Golay complementary sequence pairs — choose the signal that fits your measurement environment.
Web Component powered by Web Audio API. Headless API, multiple signal types, easy to embed in any Web Audio project.
Work in progress. The
<latency-test>web component is currently in development. The API and examples described here reflect the planned interface. See CLAUDE_REVIEW.md for migration status.
npm install @hi-audio/latency-test<latency-test id="lt"></latency-test>
<button onclick="document.getElementById('lt').start()">Test</button>
<script type="module">
import '@hi-audio/latency-test'
document.getElementById('lt').addEventListener('latency-result', (e) => {
console.log(`${e.detail.latency} ms — ratio: ${e.detail.ratio.toFixed(2)} dB`)
})
</script>start() / stop() and fires events. No built-in button or result display.latency-result CustomEvent ({ latency, ratio, timestamp }).start() call.AudioContext via element.audioContext = ac before calling start().recording-mode to select the capture backend: "mediarecorder" (v1 default, implemented) or "audioworklet" (v2 default, planned).signal-type to select the measurement signal: "mls", "chirp", or "golay".input-gain to apply a custom input gain (e.g. 50 to compensate for low Safari microphone levels).Coming soon. A live interactive demo will be available here once the component is published. It will let you test round-trip latency in your browser — with your own microphone and audio setup — before deciding whether to include the component in your project.
This component is the web component development branch of gilpanal/weblatencytest, a proof-of-concept associated with the paper presented at WAC 2025.