I think the likely reason that your mp3 is only being split into 2 or 3 parts rather than the expected 7 is that the silence is not long enough to be detected. The first thing I would do would be to load the audio files into a waveform editor such as audacity, look at the waveform and get an idea of the loudness levels and lengths of each pause between words.

I note from the docs for Audio::FindChunks that it does a lot of smoothing. Perhaps it does to much to the point that consecutive words are smoothed together. Can you adjust the smoothing parameters so that only much shorter periods of audio are smoothed together?

A few years ago, I was cutting mp3 files, but unlike you I did not have handy periods of silence to denote the cut points. Instead I had to listen to the audio, and look at it with a wave editor until I could identify cut points by sight, and then I typed the time offsets into a cut list, and used a lossless mp3 cuter to do the cuts. After a while I became quite skilled at finding the cut points, and typing them in, so if your number of mp3 files is reasonable, you might try that approach, instead of spending more time programming.


In reply to Re: 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.