Nighttime disturbances, automatic processing of records

Hi everyone,

One neighbor has been making too much noise at night, for the past several months.

I installed a system that continuously records from 11pm till 5am. I get every day 24 (.wav) files of 15 minutes each, named YYMMDD_HHMMSS.wav.

I use them manually with Audacity 2.4.3 on my Ubuntu computer, to make extract at the times we noted the noise. But noting those times on a paper then the next day making manually the extracts is difficult.

I’d like an automatic way to do this, using bash, python (audioop?) and audacity (command line ? Macro?)

Steps would be :
For each original record (15min long) :

  • identify zones where the sound is above a (empirically determined) threshold (amplitude ? Root mean square over 1 rolling second?)
  • create an extract of each such zone, save it as mp3, named with a timestamp.

Audacity, audioop, etc are new to me. Sound signal processing is new to me.

Please could you share pieces of advice how I should proceed to do this ?
Thanks a lot for your help,
Jerome

I’ve never done anything like that, but I do have an (untried) idea…
using a shellscript that picks out the files in question, you can probably use ffmpeg to make the extracts.

ffmpeg is command-line, but you can do nearly anything with it. its man page is long and terse, but it does list a few examples. I know that you can, e.g., select portions of a track by time-in-track for various operations.

Good luck!