Locating a Mysterious Beep Using AI-Driven Acoustic Triangulation
A developer uses Claude Code to build a multi-device acoustic localization system.
1The Mysterious Household Beep
An intermittent, elusive beep originating from a storage room filled with boxes prompted a creative technical solution. Rather than manually unpacking every container, the author sought to triangulate the sound source. This required a system capable of coordinating multiple listening devices to pinpoint the exact location of the noise within the room.
2Architecting the Beep Locator
The solution utilizes a Python web server acting as a central coordinator for various devices, including iPads, a MacBook Pro, and a phone. These devices connect via WebSockets, using browser-based microphone access to record audio. The system identifies potential beeps using Fast Fourier Transform and high-pass filtering to isolate specific sound frequencies.
3Historical Research and Inspiration
The project was heavily influenced by the 2007 research paper 'BeepBeep: A High-Accuracy Acoustic-Based System for Ranging and Localization'. This academic study detailed how commodity hardware, such as mobile phones, could perform high-accuracy acoustic ranging through two-way sensing and sample counting. The author successfully adapted these principles into a modern software-based implementation.
4Iterative AI-Assisted Development
Development was accelerated using Claude Code, allowing the author to prompt for features like a 'Rough mode' for manual device placement. By leveraging hot-swap module deployment, the system could receive new code updates over WebSockets without requiring manual interaction with each listening device, significantly streamlining the testing and refinement process during the project.
5Testing with Manual Claps
To validate the system's accuracy before hunting the real beep, the author implemented a clapping detection mode. Claps were displayed as distinct diamond icons on the map, allowing for real-world verification of the triangulation logic. This feature provided the necessary confidence that the software could reliably map sound sources within the room.
6Refining the Detection Logic
The system logs sounds with precise timestamps and allows users to replay audio snippets from each device. Once the mysterious beep frequency was confirmed, the application measured the intervals between beeps and used the triangulated device locations to lock down the source. This process successfully narrowed the search area to within 40cm.
7Successful Source Identification
After the system identified the most likely location, the author searched the specific pile of boxes indicated by the map. The source was revealed to be an ancient carbon monoxide detector that had been emitting intermittent alerts due to depleted batteries. The software effectively solved a frustrating physical problem through digital acoustic analysis.
8Giving Claude 'Ears'
The project serves as a practical demonstration of providing coding agents with sensory perception. While Claude lacks native audio input, it can analyze data captured by microphones through Python and JavaScript execution. By connecting these inputs to a central server, the AI agent could actively monitor, analyze, and reconfigure its own sensing environment.
9Expanding Agent Capabilities
The author draws parallels to other emerging techniques, such as using webcams to allow coding agents to observe physical hardware status. These methods enable agents to interact with the real world, moving beyond simple code generation. Such feedback loops are essential for agents to perform complex tasks that require physical-world verification and adjustment.
10Future of Agentic Perception
This experiment highlights the growing potential for AI agents to solve physical-world problems by orchestrating distributed sensor networks. By combining low-cost consumer hardware with sophisticated software coordination, developers can create specialized tools for tasks that were previously difficult to automate. The ability to perceive and act on environmental data remains a critical frontier.