in reply to MP3 Concatenation
Sound files come in two distinct flavours, linear and compressed. Linear files are .wav and family, while compressed files include .mp3 and others. The main difference is that you can directly edit a linear sound file, each value in the simple time ordered list is a amplitude value (sample) for that sound. Compressed formats are composed of frames. Even
if you can get an edit directly on a frame boundary the results are often terrible clicks because the uncompressed (recovered) value of a frame depends on its predecessors, hence arbitary frame sequences may be illegal. The prefered method in all cases is to convert to a simple time domain form , then edit, then convert back to mp3.
Practical editing to achieve your first goal, trimming, is called auto-trimming. The Windows application Sound Forge (which also imports and exports .mp3 files) has a very nice built in function to remove silence. You should also look at the open source Audacity which is scriptable in Lisp. Audio editing terminology is generally 'cutting' a piece of audio out and 'splicing' a piece of audio in. 'butt joins' (pure concatenation) is rare, usually you will use a crossfade. The parameters of each audio segment are therefore, start time, end time, and a transfer function which says how the clip you have cut will fade into the next. Removing silence works by scanning the file to find the rms (root mean square) of lowest average signal level, the noise floor, and chop out all the bits where the signal falls below this. You can get special plugins that are very effective at doing this on voice signals (for exactly your stated application ). My gut instinct is _not_ to try signal processing in Perl, but I haven't tried it (yet) and don't speak from experience. For batch processing offline files it might be effective but slow.
|
|---|