Dear Monks,

My home coding project du jour is to make a collection of MP3 "sound flashcards" for foreign language learning drills. The "basic flashcard" consists of a bit of speech signal (the "challenge"), followed by a silence, followed by some more speech signal (the "answer").

As my starting material are a few hundred "challenge" MP3 files and the matching "answer" MP3 files. My mission is to generate individual MP3 files for each challenge-answer pair. I.e. I need to stitch together a challenge file and its corresponding answer file, and stick some silence in between.

My initial idea was to generate a small "spacer" silence file using Audacity (I generated 0.1 seconds of silence and exported it as MP3), and to use MPEG::Audio::Frame to stitch together the challenge file, an variable number of copies of the spacer file, as needed, and finally the answer file.

Well, no cigar. The resulting stitched up file plays OK in Audacity, but bombs in iTunes. For some reason, iTunes aborts the playback of the file in the middle of the silence between the challenge and the answer.

I observed a lot more weirdness with this than I want to bore you with. Suffice it to say that, despite what Audacity says, I have reasons to suspect that the silence I'm inserting between the challenge and the answer is not all that quiet.

So I'm back to square 1. Can someone suggest a better way to do all this? And more specifically, a better way generate some "MP3 silence" to use as a sound spacer? (FWIW, I'm using OS X Tiger.)

the lowliest monk


In reply to How to generate MP3 silence? by tlm

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.