Nightjar

Snoring detection: is it snoring or the fan?

The most repeated complaint about snore apps is not that they miss snoring. It is that they count things that aren’t snoring: a fan, the air conditioning, traffic, a cat, a partner turning over. Here is why that happens, and how to check a night by ear instead of trusting the number.

Short answer

Snoring detection in an app is a sound classifier listening to short slices of audio, and any classifier makes some mistakes, especially with steady or rhythmic noise. Don’t trust a snore score you can’t listen to. Play the episodes the app found, mark the ones that aren’t snoring so they leave the score, and if a fan runs every night, record one night with it off to hear the difference.

Get Nightjar Every episode plays back, and any of them can be marked “Not snoring”.

How snoring detection works

An app can’t see you, so it decides from sound alone. In Nightjar, every second of the night is passed, on the phone, to YAMNet, an open sound-recognition model trained on hundreds of everyday sound classes, one of which is “Snoring”. A second whose snoring score is high enough counts as a snoring second.

Single seconds are noisy, so seconds are then grouped into episodes. In Nightjar a run needs at least three snoring seconds close together to become an episode, and snoring seconds less than 30 seconds apart join the same episode. That stops one odd breath or a lone cough from becoming “snoring”, and it turns a loud stretch into one row you can play instead of fifty.

Loudness is a separate question. A phone microphone isn’t calibrated, so a decibel figure from it would be false precision. Nightjar compares each episode with the room’s own background level, worked out from the quietest part of the last ten minutes, and calls it quiet, medium or loud.

Why the fan gets counted

A classifier learns what snoring tends to sound like: a low, rough, rhythmic sound that comes and goes with breathing. Plenty of night sounds share some of that.

SoundWhy it can be mistakenHow to tell by ear
Fan, air conditioningA steady, broad hum, sometimes with a pulsing rattleIt doesn’t rise and fall with breathing, and it’s there all episode long
Partner breathing heavilyIt is breathing, and close to the phoneSofter and smoother; no rattle on the in-breath
Cat purringLow and rhythmicMuch faster than breathing, and continuous
Traffic, a motorbikeA low rumble that swellsOne rise and fall, not a repeating pattern

A fan that runs all night does become part of the room’s background level within about ten minutes of switching on, so it stops making other sounds look louder and its hum isn’t kept as audio. The snoring model still hears it, though, so a fan that rattles at breathing speed can still produce episodes. The ones to watch most are sounds that switch on and off, like a heater or an air conditioner cycling.

How to check a night by ear

  1. Start with the loudest episode. If that one is clearly you, the night is probably mostly right.
  2. Play the short, quiet episodes too. Mistakes tend to hide there. At 1.5× or 2× a dozen episodes takes a few minutes.
  3. Mark what isn’t snoring. In Nightjar, “Not snoring?” on a row takes that episode out of the snoring time and the score; it stays in the log, and you can undo it.
  4. Look at the shape of the night. Real snoring usually comes in episodes of a few minutes, scattered through the night. A block that starts and stops at exactly the times a heater runs is worth a listen.

Here is what one correction does, using the worked example on the home page: a night of 7 h 11 min with twelve episodes and 1 h 04 min of snoring scores 34. Mark the first episode, three quiet minutes at 00:12, as not snoring, and the night reads 1 h 01 min of snoring and a score of 33. The score comes from how long and how loud the snoring was, per hour recorded, so one short quiet mistake moves it a little; a long loud one moves it a lot.

Make the next night easier to read

  • Put the phone closer to the snorer than to the fan, and turn a fan away from the bed if you can.
  • Record one night with the fan off. If the “snoring” disappears with it, you have your answer.
  • If two of you snore, one phone can’t tell whose snoring it hears. How to record your snoring covers placement, and the two-phone workaround.
  • Other sounds, like sleep talk, are kept when they stand out from the room, but they are never counted as snoring unless the model hears snoring.

Nightjar records snoring sounds. It can’t diagnose anything. If you gasp or stop breathing in your sleep, or feel very tired by day, talk to a doctor. Detection runs on the phone and no audio is uploaded; see the privacy policy.

Nightjar: hear it, then decide

Every snoring episode on a timeline of your night, every one playable at 1×, 1.5× or 2×, and anything that wasn’t snoring one tap from leaving the score. Your first full night is free.

Get Nightjar on Google Play