--- In [email protected], Saifi Khan <saifi.k...@...> wrote: > > Hi all: > > is there a way to further improvise this audio recording > script ? > > #!/bin/sh > arecord -D hw:0 -f S16_LE -r 44100 -c 2 > output.wav > > There are few queries that i have: > > 1. for a 20 sec audio, the generated file is 3.5+ Mb > should the sampling rate be reduced or some compression > utility be piped ? > > 2. a 'kir-kir-kir' sound also recorded when the laptop is > running on power through UPS. however no such sound comes > when power cable is disconnected. > What are the good approaches to filter such sounds ? > > All suggestions and replies are welcome. > > > thanks > Saifi. >
Saifi, 1. encoding You are recording 44.1khz, 16 bit stereo audio. That's CD quality, and wav file will take about 10 mb per min. You might want to encode it to some compressed format, like ogg/mp3, or if you don't want to loose quality - flac. I suggest you to try ogg first.(install vorbis-tools, pipe oggenc command) If you are recording from a mono source, like mic, you don't need to record as stereo (-c 2), this way you can save 50% space. If you are recording voice and you have tight space restrictions, you can experiment with lowering sample rate (32 khz, 16 khz) and trying voice specific codex like Speex. But mostly this would be unnecessary. 2. noise UPSs usually don't supply clean sine wave. It irritates all audio sources, so we hear a vibrating noise in speakers, pre-amps etc. Some laptops have problems with battery power too, i guess that could be because of the crappy mic preamp/shielding/earthing issue. It's not very easy to clean up these noises from recorded audio without loosing some quality. You can use audacity for this work. If you send me some audio I might be able to tell how to clean it up. Cheers, Ananth

