Locating the source of a mysterious beep
331 points
• 2 days ago
• Article
Link
当一个神秘且断断续续的蜂鸣声开始从一个堆满盒子的房间里传出时,作者转向 Claude Code,创建了一个基于软件的解决方案来对声音进行三角定位。与其手动翻找每一个容器,作者做了 Beep Locator:一套系统,会在房间周围布置多个设备(如手机、平板和笔记本),让它们构成一个麦克风网络。整个方案依赖一个 Python 的 Web 服务器,通过 WebSockets 协调这些设备,使它们能够录制音频、识别特定频率的声音,并把数据回传到中央地图以供分析。
Beep Locator 的架构灵感来自 2007 年一篇名为 BeepBeep 的研究论文,该论文介绍了利用现成硬件实现设备间高精度声学测距的方法。系统通过让各设备录制短音频片段来工作。一旦检测到声音,服务器就会指挥一个流程:设备播放一个短促的 chirp,从而让系统能够精确对齐录制到的音频片段。通过比较声音在不同位置的到达时间,软件就能计算蜂鸣声的坐标。为保证精度,作者还加入了一个手动的 "Rough mode",允许用户在地图上拖动设备图标来反映它们的真实位置,随后系统再结合声学数据对这些位置进行进一步修正。
实现这款应用是一个由 Claude Code 和 Fable 5.2 model 驱动的迭代过程。作者使用了一种 "hot-swap" 机制,让服务器能够在实时监听的设备上推送新的 JavaScript 代码,从而免去了开发期间与设备进行物理交互。过程中,作者陆续加入了多项功能,比如用于测试的 clap-detection mode 、带时间戳的日志(logs),以及回放(replay)功能——作者可以逐一收听每个设备录制的片段,确认它们是否与那个神秘蜂鸣声一致。最终,系统把噪声源(一个旧的 carbon monoxide detector)定位到了大约 40 厘米的范围内。
这个项目不只是为了立刻解决问题,也展示了把编码代理(例如 Claude)赋予感知能力的可能性。尽管 Claude 没有原生的音频输入,但它依然可以通过让外部设备借助浏览器去采集并分析音频数据,从而有效地"听见"外界。通过让编码代理能够感知并回应现实世界的刺激,作者展示了一种富有创意的代理工作流。能够与物理环境互动并进行观察,也意味着 AI 代理在协助处理复杂的非数字任务方面迈出了令人期待的一步。
When a mysterious, intermittent beeping began originating from a room filled with packed boxes, the author turned to Claude Code to create a software-based solution for triangulating the sound. Rather than manually searching through every container, the author built Beep Locator, a system that utilizes multiple devices—such as phones, tablets, and laptops—positioned around the room as a network of microphones. The setup relies on a Python web server that coordinates these devices via WebSockets, allowing them to record audio, detect specific sound frequencies, and feed data back to a central map for analysis.
The architecture of Beep Locator was inspired by a 2007 research paper titled BeepBeep, which outlines techniques for high-accuracy, device-to-device acoustic ranging using off-the-shelf hardware. The system functions by having devices record short audio buffers. When a sound is detected, the server orchestrates a process where devices play a short chirp, allowing the system to align the recorded audio clips precisely. By comparing the arrival times of the sounds at different locations, the software can triangulate the coordinates of the beep. To ensure accuracy, the author included a manual "Rough mode," allowing users to drag device icons on the map to reflect their actual positions, which the system then refines using acoustic data.
Building the application was an iterative process driven by Claude Code and the Fable 5.2 model. The author utilized a "hot-swap" mechanism that enabled the server to push new JavaScript code to the listening devices in real-time, removing the need for physical interaction with the devices during development. Throughout the process, the author added several functional features, such as a clap-detection mode for testing, timestamped logs, and a replay feature that allowed the author to listen to the specific clips recorded by each device to confirm they matched the mystery beep. Eventually, the system identified the source of the noise—an old carbon monoxide detector—to within approximately 40 centimeters.
Beyond simply solving the immediate problem, this project highlights the potential for giving coding agents, like Claude, sensory capabilities. Although Claude lacks native audio input, it can effectively "hear" the world by commanding external devices to capture and analyze audio data through the browser. By enabling a coding agent to perceive and respond to real-world stimuli, the author demonstrated a creative approach to agentic workflows. This capability to interact with and observe the physical environment marks an exciting step in the evolution of how AI agents can assist with complex, non-digital tasks.
172 comments • Comments Link
• 寻找神秘、间歇性的蜂鸣声来源,是一个经典而又让人沮丧的家庭难题;由于纯音(pure tones)和声波反射(sound reflection)的物理特性,它通常很难仅靠简单的听觉定位就解决。
• 用廉价的麦克风和基础音频软件临时搭建一个相位偏移检测系统,可以把一场令人抓狂的搜寻变成一次精准的三角定位训练。
• 将互相关函数(cross-correlation functions)应用到来自多个未同步设备的音频波形上,可以准确测量飞行时间差(time-of-flight differences),从而提供一种比人工盲找更"高科技"的替代方案。
• 对人类而言,纯正弦波蜂鸣(pure sine-wave beeps)几乎难以定位,因为它缺少大脑用来计算双耳时间差(interaural time differences)所需的复杂泛音(complex overtones)和尖锐的起音瞬态(sharp attack transients)。
• 尽管像物理二分搜索(移动箱子)这样的手动方法在纯体力劳动层面往往更有效,但构建一个联网、由 AI 辅助的定位系统,带来的独特满足感和学习机会不容小觑。
• 现代大语言模型(LLMs)可以被有效用于统筹复杂任务,比如编写代码分析音频采集(audio captures)或起草项目计划;通过把结构化推理外包给模型,就能更高效地完成工作。
• 用 AI 生成一份"problems.md"文档,是一次把目标理清楚的有价值实验;即便直接动手实施看起来更省事,它仍然可能带来更好的思考效果。
• 关于"硬核体力劳动"与"简单自动化方案"的争论,触及了一个根本分歧:是在构建过程中的挣扎里寻找满足感,还是在结果的效率里寻找满足感。
• 声学成像相机(acoustic imaging cameras)和麦克风阵列(microphone arrays)正变得越来越常见;它们就像声音世界里的热成像相机一样,能为音频源提供可视化的热力图(heatmaps)。
• 恶作剧装置和不断故障的电子设备,往往会逼得个人不得不采取极端且富有创造性的办法,来恢复自家环境的安宁。
这场讨论围绕传统的手动问题解决方式与现代 AI 辅助工程之间的张力展开。虽然不少参与者认为,简单的体力劳动或逻辑推理才是定位蜂鸣设备最有效的手段,但也有人在搭建自定义软件方案的智力挑战中找到了同样重要的价值。对话凸显了 AI 代理(AI agents)如何改变软件开发:它让工作重心从单纯的个人代码编写,转向更高层级的编排(orchestration)与实验(experimentation)。归根结底,这次交流反映了一种共同的人类体验——人们总要与家中那些神秘的噪声"较劲",而解决它们的方式也多种多样:有人靠蛮力推进,有人则用更复杂、更有趣的技术临场发挥来寻找答案。 • Finding the source of a mysterious, intermittent beep is a classic, frustrating household problem that often defies simple auditory localization due to the physics of pure tones and sound reflection.
• Improvising a phase-shift detection system using cheap microphones and basic audio software can turn a maddening search into a precise triangulation exercise.
• Cross-correlation functions applied to audio waveforms from multiple unsynchronized devices can accurately measure time-of-flight differences, providing a high-tech alternative to manual searching.
• Pure sine-wave beeps are notoriously difficult for humans to locate because they lack the complex overtones and sharp attack transients necessary for the brain to calculate interaural time differences.
• While manual methods like physical binary searching (moving boxes) are often more efficient in terms of raw labor, building a networked, AI-assisted locator system offers unique technical satisfaction and learning opportunities.
• Modern LLMs can be effectively used to orchestrate complex tasks, such as writing code to analyze audio captures or drafting project plans, by outsourcing the structural reasoning to the model.
• Using AI to generate a "problems.md" document can be a valuable experiment in clarifying goals, even if it feels like an unnecessary step compared to direct implementation.
• The debate between "hard" manual labor and "easy" automated solutions touches on the fundamental divide between finding satisfaction in the struggle of building vs. the efficiency of the result.
• Acoustic imaging cameras and microphone arrays are increasingly accessible tools that function like thermal cameras for sound, providing visual heatmaps of audio sources.
• Prank devices and failing electronics often create situations where individuals must resort to extreme, creative measures to regain peace of mind in their living environments.
The discussion explores the tension between traditional manual problem-solving and modern, AI-assisted engineering. While many participants argue that simple manual labor or logical deduction is the most efficient way to locate a beeping device, others find significant value in the intellectual challenge of building a custom software solution. The dialogue highlights how AI agents are changing the way software is developed, shifting the focus from individual code-writing to higher-level orchestration and experimentation. Ultimately, the conversation reflects a shared, human experience of battling mysterious household noises and the varied ways people find closure, whether through brute force or elaborate, playful technical improvisation.