linux skype

Sep 23, 2015 16:50

Давно не работал микрофон в скайпе.
Как и положено, решение оказалось на страничке Troubleshooting только почему-то для арклиукса. С первого раза не заработало, потом рецепт затерялся. Сохраню, на всякий случай, на память.


https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Static_noise_in_microphone_recording

Static noise in microphone recording

If we are getting static noise in Skype, gnome-sound-recorder, arecord, etc.'s recordings, then the sound card sample rate is incorrect. That is why there is static noise in Linux microphone recordings. To fix this, we need to set the sampling rate in /etc/pulse/daemon.conf for the sound hardware.
Determine sound cards in the system (1/5)

This requires alsa-utils and related packages to be installed:

$ arecord --list-devices

**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 2: ALC888 Analog [ALC888 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0

Sound card is hw:0,0.
Determine sampling rate of the sound card (2/5)

arecord -f dat -r 60000 -D hw:0,0 -d 5 test.wav

"Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 60000 Hz, Stereo
Warning: rate is not accurate (requested = 60000Hz, got = 96000Hz)
please, try the plug plugin

observe, the got = 96000Hz. This is the maximum sampling rate of our card.
Setting the sound card's sampling rate into PulseAudio configuration (3/5)

The default sampling rate in PulseAudio:

$ grep "default-sample-rate" /etc/pulse/daemon.conf

; default-sample-rate = 44100

44100 is disabled and needs to be changed to 96000:

# sed 's/; default-sample-rate = 44100/default-sample-rate = 96000/g' -i /etc/pulse/daemon.conf

Restart PulseAudio to apply the new settings (4/5)

$ pulseaudio -k
$ pulseaudio --start

Finally check by recording and playing it back (5/5)

Let us record some voice using a microphone for, say, 10 seconds. Make sure the microphone is not muted and all

$ arecord -f cd -d 10 test-mic.wav

After 10 seconds, let us play the recording...

$ aplay test-mic.wav

Now hopefully, there is no static noise in microphone recording anymore.
No microphone on Steam or Skype with enable-remixing = no

When you set enable-remixing = no on /etc/pulse/daemon.conf you may find that your microphone has stopped working on certain applications like Skype or Steam. This happens because these applications capture the microphone as mono only and because remixing is disabled, Pulseaudio will no longer remix your stereo microphone to mono.

To fix this you need to tell Pulseaudio to do this for you:

1. Find the name of the source

# pacmd list-sources

Example output edited for brevity, the name you need is in bold:

index: 2
name:
driver:
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY

2. Add a remap rule to /etc/pulse/default.pa, use the name you found with the previous command, here we will use alsa_input.pci-0000_00_14.2.analog-stereo as an example:

/etc/pulse/default.pa

### Remap microphone to mono
load-module module-remap-source master=alsa_input.pci-0000_00_14.2.analog-stereo master_channel_map=front-left,front-right channels=2 channel_map=mono,mono

3. Restart Pulseaudio

# pulseaudio -k

Note: Pulseaudio may fail to start if you don't exit a program that was using the microphone (e.g. if you tested on Steam before modifying the file), in which case you should exit the application and manually start Pulseaudio

# pulseaudio --start

skype, linux, opensource

Previous post Next post
Up