Bluetooth Latency Test
Delay the green flash until it appears in sync with the ding, then calculate your estimated audio latency.
Beat tempo
Light delay
Increase the delay until the light appears in sync with the sound in your headphones.
Lately I've been using VSCode and Copilot to quickly create simple apps for my specific niche use cases. Yesterday I wanted to measure the latency of my bluetooth earphones. I quickly found a bunch of websites online, but all of them rely on the user pressing a button after hearing an audio signal. While some of them perform a "calibration run" at the beginning to measure the user's reaction time so it can be subtracted from the later measurements, I still wasn't confident with the accuracy of the results, since your reaction time can vary slightly between two measurements.
My idea was to have a light that flashes at a fixed tempo along with an audio ding. Ideally, both the visual and auditory cues will be in sync. When using a bluetooth devices that introduces latency, the audio will be delayed. The user can then move a slider to offset the light flashing until the light and sound are once again in sync. The duration by which the flashing light was offset is the latency of the user's bluetooth device.
I gave this to Copilot as a prompt, and it pretty quickly created an implementation of it in a single HTML file. I had a couple of back-and-forths with the model to get it to look and behave just how I wanted, but I'm pretty happy with the result. Although I could have implemented something functionally identical without AI with my current Javascript knowledge, there's no way I could make the UI as good looking.
I had to do a lot of clean-up manually to integrate the "app" well into my current article format, but I think it looks pretty good! I'm planning to create more of these small utilities soon.