Live data from Hacker News

I let AI build a tool to help me figure out what was waking me up at night

martin.sh

21–30 of 307 posts

Re: I let AI build a tool to help me figure out what was waking me up at night

#21
post #15

I was under the impression that the pattern "I have a problem -> let's ask AI" is frowned upon here.

It seems fine if you express what you did without focusing on the code.

It resonates well with what some people have been saying about building software for 1 person.

Re: I let AI build a tool to help me figure out what was waking me up at night

#22
This is really cool. We did a similar thing around 2 years ago but didn't use AI in that case. Just used a phone to record a few nights sleeping. Then a python script. I manually listened for some time in order to find the threshold amplitude (where all sounds would be ignored below and tracked above). Generated a graph that should the spikes of interest. Clicked on the spikes which went to the timestamp in the audio and listened. Not super scientific I know.

Two observations. 1. Often you wake up after a loud noise but like 5 minutes later with no memory of it. 2. even if you don't wake up from the noise your breathing changes, more likely to talk in sleep and shuffle more. So even if you not waking up your quality of sleep is disrupted.

Our case had some random construction like noise in the early morning, lasted around 10 seconds and disappeared. However, we noted even ordinary sounds we didn't think was loud was effecting our sleep.

Solution for that place was earplugs and a loud fan to generate white noise.

Re: I let AI build a tool to help me figure out what was waking me up at night

#23
I like the temperate graph halfway down the page. It looks like two decaying exponentials alternating every ~40 minutes, with the downward one steeper than the upward one. It's a neat visualization of hysteresis, where the thermostat presumably has a different temperature threshold for turning off or turning on (or perhaps there's a minimum time between state switches). Without the scale it's hard to know for sure.

Re: I let AI build a tool to help me figure out what was waking me up at night

#24

My sleep was not good so I installed panelling and now I sleep better. There you go. Saved you 8 hours and using AI

Can you tell me more about this panelling?

They’re called “MITTZON”, made for offices. Also great room separators. I’ve tested them for a few nights and they work surprisingly well.

Otherwise making sure the windows are properly sealed is first resort. And if you’re living with other people (partner, flatmates, family) it also helps to check the doors

Re: I let AI build a tool to help me figure out what was waking me up at night

#27
This is cool, but a simple circular buffer audio recorder connected to stdin would have been sufficient. The recorder records continuously on a circular buffer that stores the last 5 minutes, and whenever OP wakes up, he can press any key on the keyboard to dump the current 5 minutes on storage, with the timestamp as file name. False positives are much less possible, and the whole system can just be a small CLI program.

Re: I let AI build a tool to help me figure out what was waking me up at night

#28
post #5

This is cool don't get me wrong, but surely overcomplicated? Why not just record audio to disk the whole night then eyeball the waveform for loudness spikes? If you just don't connect it to any network at all, there's no data breach risk (or am I misunderstanding the justification for the noise-detection toggle thing?). Also the AI-generated hero image looks vile.

Thx for the feedback about the hero image. I just removed it. (you weren’t the only one pointing it out)

The intention was to have something less detailed than the screenshot in the post.

About the other thing: yes this would have worked for a night or so. I wanted to be able to go back and forth between nights and compare. I also had concerns about the SD-card durability and storage capacity. Still, after an hour into letting the coding agent do its thing, I was impressed by the result, so more and more ideas popped into my head

Re: I let AI build a tool to help me figure out what was waking me up at night

#29
post #19
post #9

what a waste of technology. you could have had a pen and graph paper hooked up to an microphone 100 years ago and looked for the spikes in the time set.

it could also be common sense.. you live in a noisy city and you are wondering what the noise is.... maybe it could be the city itself? how about sleep in a different smaller town and then ask yourself the same question, you'll probably get a different answer.

I'm not sure if things are really that simple, at least from my personal experience. I think the quality of noise and noise floor can make a difference
Post reply on HN