I think you need to use much shorter time intervals for the min_silence_sec and min_signal_sec parameters. I don't know how the internals of that module work, and how it does silence detection, but it is quite possible that it chops the audio up into chunks that are min_silence_sec, and tests each to see if they are silent. In practice most of those chunks will contain some signal, so the module will not detect much silence.

If I where you, I would write a script that tries out lots of different values for those three parameters, and tabulates the results according to the number of chunks found. You know that there ought to be 7 chunks in the sample you linked to, so just try out lots of values for min_signal_sec and min_silence_sec between 0.01 sec and 0.5 sec, and in each case count the number of chunks you get back. Ideally you should do permutations and build a table, or perhaps use some sort of genetic algorithm to home in on the correct set of settings.

As you have already found, if min_silence_sec and min_signal_sec are to long, then not enough chunks are found. If they are to small, then your audio will get split in to many places, but there will probably be a wide range of values that work correctly. From that you can try feeding your test script with some more audio files until you know what values work reliably.

The mp3 chunk size is 1/25 of a second. It is in the docs for MP3::Split by the same author as Audio::FindChunks.


In reply to Re^3: Split MP3 file at silence by chrestomanci
in thread Split MP3 file at silence by Dirk80

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.