Show HN: 外界之声 – 将户外夜间声音实时传输到床边。iOS/免费
1 分•作者: telecuda•6 个月前
嘿,HN。我开发了一个名为 Outside In 的小型 iOS 应用程序(<a href="https://apps.apple.com/us/app/outside-in/id6759529344">https://apps.apple.com/us/app/outside-in/id6759529344</a>)。
这个想法很简单:你把一个备用/旧 iPhone 放在外面(门廊、窗台、后院),另一个放在床边。外面的手机捕捉那里发生的一切——蟋蟀、雨声、风声,偶尔还有猫头鹰——并通过你的本地 Wi-Fi 将其流式传输到里面的手机。你把里面的手机面朝下放好,然后伴着这些声音入睡。
我开发这个应用程序是因为我和我的伴侣过去常常在晚上开着窗户,以便听到外面的声音,但外面的温度并不总是适合这样做。我想要在睡觉时听到开窗的声音,但又不受天气的影响。
一些技术细节:
手机通过 Bonjour(NWListener/NWBrowser)互相找到对方,然后通过带有长度前缀帧的普通 TCP 连接流式传输 PCM 音频。48kHz 单声道 Float32。没有服务器,没有互联网。所有内容都保留在本地网络上。
有一个语音抑制功能,它使用 Apple 的 SoundAnalysis 框架来检测设备上的人声并将其过滤掉。它运行一个滞后门,大约 55% 的置信度阈值用于关闭,大约 30% 用于重新打开,并有 3 秒的保持时间,这样它就不会出现颤动。增益斜坡是每个缓冲区的指数级,以避免出现咔哒声。它的效果出奇地好。人行道上的对话会被抑制,但你仍然可以听到它们后面的蟋蟀声。
里面的手机使用加速度计来检测它何时面朝下且静止(gravity.z > 0.85 + 1.75 秒的静止缓冲),然后淡入音频。拿起它时,音频会淡出。整个交互模型基本上是“放下它,然后忘记它”。
没有帐户,没有云,没有分析,没有录音。零外部依赖。所有 Apple 框架。免费,无广告,无应用内购买等。我为自己开发了这个应用程序,并认为其他人可能也需要它。
很乐意回答问题(不可避免地,有些人会说“我为什么要听 X 城市的外面声音?” :)
查看原文
Hey HN. I built a small iOS app called Outside In (<a href="https://apps.apple.com/us/app/outside-in/id6759529344">https://apps.apple.com/us/app/outside-in/id6759529344</a>).<p>The idea is simple: you put a spare/old iPhone outside (porch, windowsill, backyard) and keep the other one by your bed. The outside phone captures whatever's happening out there — crickets, rain, wind, the occasional owl — and streams it to the inside phone over your local Wi-Fi. You flip the inside phone face-down and fall asleep to it.<p>I built this because my partner and I used to leave a window cracked at night to hear the outside, but the outside temperature isn't always compatible with that. I wanted the sounds sleeping with the window open without the weather.<p>Some technical details:<p>The phones find each other via Bonjour (NWListener/NWBrowser), then stream PCM audio over a plain TCP connection with length-prefixed framing. 48kHz mono Float32. No server, no internet. Everything stays on the local network.<p>There's a speech suppression feature that uses Apple's SoundAnalysis framework to detect human voices on-device and gate them out. It runs a hysteresis gate with ~55% confidence threshold to close and ~30% to reopen, with a 3-second hold time so it doesn't flutter. The gain ramping is exponential per-buffer to avoid clicks. It works surprisingly well. Conversations on the sidewalk get suppressed but you still hear the crickets behind them.<p>The inside phone uses the accelerometer to detect when it's face-down and still (gravity.z > 0.85 + a 1.75s stillness buffer), then fades audio in. Pick it up and it fades out. The whole interaction model is basically "put it down and forget about it."<p>No accounts, no cloud, no analytics, no recording. Zero external dependencies. All Apple frameworks. Free, no ads, no IAP etc. I built it for myself and figured others might want it too.<p>Happy to answer questions (inevitably some folks who would say "why would I want to listen to outside in X city?" :)