Results 1 to 3 of 3

Thread: Deleting empty sound files

  1. #1
    Join Date
    Jun 2006
    Location
    Pulham Market, England
    Beans
    104
    Distro
    Xubuntu

    Deleting empty sound files

    Hello.

    Really quick question. I have a script (arecord/lame) that's recording people talking in a room using a system of microphones into a soundcard. Works great. Issue is, for large amounts of time, there is no sound, just background noise. Is there a way I can detect if the amplitude of a mono sound recording goes above a threshold, ultimately with the view of deleting "quiet" files to save disk space.

    The files are MP3 files, written with lame, and are broken into 10 minute chunks. I'm happy to uncompress them back to wav to check the audio levels. Just something that's like "threshold_audio --th 0.3 somefile.audio" and have it return 0 or 1 or something I can use (grep/awk) to find the answer?

    Kindest regards

    George, M1GEO.com

  2. #2
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Deleting empty sound files

    Have a look at mp3splt (not a typo in the name; it is mp3splt, not mp3split) which will split mp3 files in many different ways including silence detection.

    It does not normally decode and re-encode in order to do this, though it has to decode to carry out this silence detection. I am not sure if it then has to re-encode, or if the decoding is just to get the silence timings.

    It is a command line app that I have used a huge number of times, though never for that purpose; more usually to split a large file of a whole side of a vinyl LP that I have recorded to an old audio CD recorder and then ripped to mp3. I did try the silence detection for that but the LPs were not of good enough quality to get a consistent level for the "silence" between tracks, so I simply used the time options of mp3splt instead.

  3. #3
    Join Date
    Jun 2006
    Location
    Pulham Market, England
    Beans
    104
    Distro
    Xubuntu

    Re: Deleting empty sound files

    That looks very useful, thanks. I will have a look into it over the next few days, and report back with findings.

    Cheers!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •