我是 Linux 新手,想将其用作日常驱动程序,但是,我想消除麦克风的噪音,经过一番谷歌搜索后,我发现可以编辑 pulseaudio 配置文件来加载特定的模块,如下所示:-
https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Enable_Echo/Noise-Cancellation
于是我打开终端,输入
sudo nano /etc/pulse/default.pa
然后添加以下行
### Enable Echo/Noise-Cancellation
load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0 digital_gain_control=1" source_name=echoCancel_source sink_name=echoCancel_sink
set-default-source echoCancel_source
set-default-sink echoCancel_sink
之后,我重新启动了电脑,但每次我做一些与录音相关的事情时,我的电脑都会冻结大约一秒钟(比如转到设置->声音,在反恐精英全球攻势中开始录音,在 steam 中测试麦克风等...)。
然后我打开pavucontrol
,看到了这个:-
有人知道我做错了什么吗?
运行sudo journalctl -xe | tail -25
结果如下:-
Jan 12 00:26:12 nitish-Linux obexd[2392]: OBEX daemon 5.48
Jan 12 00:26:12 nitish-Linux dbus-daemon[1390]: [session uid=1000 pid=1390] Successfully activated service 'org.bluez.obex'
Jan 12 00:26:12 nitish-Linux systemd[1185]: Started Bluetooth OBEX service.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
-- Reboot --
Jan 11 23:54:43 nitish-Linux pulseaudio[2494]: Can't cancel echo between a sink and its monitor
Jan 11 23:54:43 nitish-Linux pulseaudio[2494]: Failed to load module "module-echo-cancel" (argument: "use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0 digital_gain_control=1" source_name=echoCancel_source sink_name=echoCancel_sink"): initialization failed.
Jan 11 23:54:43 nitish-Linux pulseaudio[2494]: Module load failed.
Jan 11 23:54:43 nitish-Linux pulseaudio[2494]: Failed to initialize daemon.
Jan 11 23:55:15 nitish-Linux pulseaudio[2515]: [pulseaudio] module-echo-cancel.c: Can't cancel echo between a sink and its monitor
Jan 11 23:55:15 nitish-Linux pulseaudio[2515]: [pulseaudio] module.c: Failed to load module "module-echo-cancel" (argument: "use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0 digital_gain_control=1" source_name=echoCancel_source sink_name=echoCancel_sink"): initialization failed.
Jan 11 23:55:15 nitish-Linux pulseaudio[2515]: [pulseaudio] main.c: Module load failed.
Jan 11 23:55:15 nitish-Linux pulseaudio[2515]: [pulseaudio] main.c: Failed to initialize daemon.
Jan 11 23:55:15 nitish-Linux pulseaudio[2512]: [pulseaudio] main.c: Daemon startup failed.
Jan 12 00:10:30 nitish-Linux pulseaudio[3085]: [pulseaudio] module-echo-cancel.c: Can't cancel echo between a sink and its monitor
Jan 12 00:10:30 nitish-Linux pulseaudio[3085]: [pulseaudio] module.c: Failed to load module "module-echo-cancel" (argument: "use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0 digital_gain_control=1" source_name=echoCancel_source sink_name=echoCancel_sink"): initialization failed.
Jan 12 00:10:30 nitish-Linux pulseaudio[3085]: [pulseaudio] main.c: Module load failed.
Jan 12 00:10:30 nitish-Linux pulseaudio[3085]: [pulseaudio] main.c: Failed to initialize daemon.
Jan 12 00:10:30 nitish-Linux pulseaudio[3082]: [pulseaudio] main.c: Daemon startup failed.
答案1
我找到了解决方案,在编辑配置文件之前,我必须确保内置音频的硬件配置了“模拟立体声双工”配置文件,我将其设置为“模拟立体声输出”,正如所指出的:-
https://forum.manjaro.org/t/sound-problems-since-last-stable-update/30773/22
E:[pulseaudio] module-echo-cancel.c:无法取消接收器与其监视器之间的回声
Pulseaudio 无法启动,因为模块回声取消找不到麦克风输入。
如果唯一可用的输入设备是输出接收器的监视器,那么最好让 pulseaudio 出现错误,而不是尝试使用 2 个相同的信号来消除回声。我无意中通过将平衡麦克风信号连接到立体声线路而造成了类似的情况 - pulseaudio 将平衡的热和冷重新混合为单声道以进行 Skype 通话,所有呼叫者听到的都是静音,因为重新混合 2 个异相信号会取消所有内容,但它看起来仍然像在 Pulseaudio Mixer 中工作一样。
现在您已经启动了 Pulseaudio,可以尝试使用终端命令重新添加额外的模块:
pactl load-module module-echo-cancel
如果仍然出现相同的错误,请检查 Pulseaudio Mixer 是否显示设备设置为“双工”以允许音频输入和输出,同时检查输出设备是否显示为“(拔出)”