LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   removing mic noise problem (http://www.linuxquestions.org/questions/slackware-14/removing-mic-noise-problem-4175446387/)

matters 01-19-2013 04:47 PM

removing mic noise problem
 
Im having trouble removing microphone backround noise. By executing arecord only it shows:

Code:

arecord test.wav
Recording WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
^CAborted by signal Interrupt...

however bacground noise is fixed by changing the sample rate - by executing:

Code:

arecord -f dat -r 48000 -D hw:0,0 -d 5 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

is it anyhow possible to change it so it will be changed by default to 48000 via alsamixer? thanks!

thanks

elesmod 01-20-2013 06:48 AM

I don't know if you can set it in alsamixer (you'll have to wait for people with more knowledge to respond), but I might have a different solution for you.

Make an alias, so that the command 'arecord' will do something different. In the terminal type this:
Code:

alias arecord='arecord -f dat -r 48000 -D hw:0,0 -d 5'
Note that after reboot, the alias will be gone. If you want it to stick through restarts, add that line to your .bashrc and/or (depending on how you're loging into your terminal) .bash_profile.

ukiuki 01-20-2013 07:00 AM

Converting Sample Rates On Input
This is probably what you need.

Regards

matters 01-21-2013 05:31 AM

Quote:

Originally Posted by ukiuki (Post 4874007)
Converting Sample Rates On Input
This is probably what you need.

Regards

Thats what ive tried before i posted this thread. I have created .asoundrc in the user home directory, and .asoundrc contained only the following lines:

Code:

pcm.rate_convert {
    type plug
    slave {
        pcm "hw:0,0"
        rate 48000
    }
}

That however, dosent solve the problem. Do i have to add something more to the file in order to make it work?

Btw, arecord parameters was just an example of how changing sample rate to 4800Hz fixed the problem. I need mic to work especially with skype.
Thanks!

dh_ 01-21-2013 06:09 AM

Are you sure it's the modified sampling rate that fixes it? I have a similar issue and it seems to be the “-f dat” flag which fixes it.

matters 01-21-2013 11:49 AM

Quote:

Originally Posted by dh_ (Post 4874586)
Are you sure it's the modified sampling rate that fixes it? I have a similar issue and it seems to be the “-f dat” flag which fixes it.

From my end -f dat <filename.wav>, although it shows that specifies rate by default to 48000 it dosent fix the problem, it fixes it only when i explicitly changed the sample rate, just like i presented above.


All times are GMT -5. The time now is 07:44 AM.