Pulseaudio does not apply new config/deaemon changes

Hi,

I have a problem that my microphone has a lot of noise while speaking. But I found out that the pulseaudio sampling rate was too low and therefore I tried to change the settings of the samling rate by changing the value from 44100 to 48000.

default-sample-rate = 48000
alternate-sample-rate = 48000

But when I kill and restart pulseaudio and also then try to make a audio record it shows me that it uses still the old settings (and the noise is still there):

pulseaudio -k
pulseaudio --start
arecord -f cd -d 5 test_mic.wav 

result:

Recording WAVE ‘test_mic.wav’ : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

This means that the changes of the daemon.conf in (/etc/pulse/) did not get applied even if the .conf file did not change.

Any ideas what is wrong or maybe if there are other .conf files that override mines?

THX

That’s probably not what it means - and
… you did change it …
I don’t know how to check the current, now changed, configuration - to see whether it’s valid or contains errors -
but it should be easy to find out.

Without knowing anything about recording
this looks like you are recording through alsa (you use arecord)
when you probably should or would want to use pulseaudio, which you just reconfigured.
parec
would be the command, I guess
for example:

https://blog.tausys.de/2016/12/21/pulseaudio-audio-stream-von-programmen-aufnehmen/

https://askubuntu.com/questions/60837/record-a-programs-output-with-pulseaudio

hth

You can check the settings by pacmd list-sinks.

I have read some articles in the internet to restart pulseaudio, but this didn´t work.
I had to restart the computer.

Command arecord records audio from ALSA and would not be affected by settings configured in PulseAudio

Option -f sets the recording format in ALSA as explained in manpage man arecord

      -f --format=FORMAT
              Sample format
              Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE
              S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE
              FLOAT_BE FLOAT64_LE  FLOAT64_BE  IEC958_SUBFRAME_LE  IEC958_SUB‐
              FRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM SPECIAL S24_3LE S24_3BE
              U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE  S18_3BE
              U18_3LE
              Some of these may not be available on selected hardware
              The available format shortcuts are:
              -f cd (16 bit little endian, 44100, stereo) [-f S16_LE -c2 -r44100]
              -f cdr (16 bit big endian, 44100, stereo) [-f S16_BE -c2 -r44100]
              -f dat (16 bit little endian, 48000, stereo) [-f S16_LE -c2 -r48000]
              If no format is given U8 is used.

To check PulseAudio configuration use this command:

pulseaudio --dump-conf

Changes made to settings in /etc/pulse/daemon.conf might not be effective if the semi-colon comment tag at the start of each line is not removed

man pulse-deamon.conf

       The configuration file is a simple collection of variable declarations.
       If the configuration file parser encounters either ; or  #  it  ignores
       the rest of the line until its end.

PulseAudio might not restart and load new settings correctly if the daemon is killed with pulseaudio -k .
Only one command is needed to correctly restart PulseAudio

systemctl --user restart pulseaudio