el_Plago has asked for the wisdom of the Perl Monks concerning the following question:

I have a list of wav files and I need to put 1 second of silence at the beginning of them and then convert them to mp3 format. There are some renaming issues involved too, but those are covered. What I'm sick of doing is using some huge windows sound editing app to do this. Has anyone ever used/heard of any perl modules that would allow me to do this?

The major problem here is padding the files with 1 second of leading silence.

I checked CPAN and it seems that while there are modules galore for graphics, there isn't much related to sound.

Replies are listed 'Best First'.
Re: Sound Editing
by wog (Curate) on Jul 28, 2001 at 00:29 UTC

    CPAN has enough to accomplish your task.

    The adding a second of silence part can easily be done with Audio::Wav::Read and maybe Audio::Wav::Write. One second's worth of silence would be represented as sampling rate x channels 0 samples at the beginning of the wav.

    As for encoding an MP3, you could use Audio::MPEG which interfaces with LAME's library to encode MP3s.

    update: minor repharsing in second paragraph.

Re: Sound Editing
by PetaMem (Priest) on Jul 28, 2001 at 18:54 UTC
    Hi,

    in case you donīt want use a CPAN-Module and just need
    to generate a 1s silence Wav have a look at my PVSG
    project (discontinued), there are all functions you need
    for that.

    Ciao