http://www.perlmonks.org?node_id=1014237


in reply to How to record audio file?

I did a google search for 'perl win32 record audio' and the first hit was to Win32::SoundRec which looks like it is what you want.

Replies are listed 'Best First'.
Re^2: How to record audio file?
by redss (Monk) on Jan 20, 2013 at 15:51 UTC
    This is pretty much what I was looking for, thanks for the tip. It has very high level api calls but unfortunately, the MCI library seems limited as for how much I can configure the soundcard I'm recording from (audio is recorded too low with too much noise), so I guess I have to keep looking for a more robust customizable audio library API. I found that audacity uses the portaudio api, but the perl module to access that is too low level for me at this point.

      How will the recording level affect the amount of noise?

      I was going to test this module but found it won't install due to missing dependancies on CPAN.

        Lotus1:

        How will the recording level affect the amount of noise?

        It doesn't. The noise is there. But i think the higher the input level is the less you can here the noise in the recordings.

        Regards, Karl

        «The Crux of the Biscuit is the Apostrophe»

      ress, i didn't use Win32::SoundRec yet.

      But from the manual:

      record([$bitspersample, $samplespersec, $channels])
      ...The three parameters are optional. $bitspersample defaults to 8, $samplespersec defaults to 11025, $channels defaults to 1.

      Even cheaper cards have up to 24Bit/96kHz. Did you try?

      And perhaps using a preamp/mixer?

      Regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

        We're getting off topic here but I'm curious why you think the recording resolution will affect the recording level? A high resolution or high frequency sample of a small signal is still a small signal.