从麦克风录制的音频以爆音和淡入开始。我尝试了来自两个硬件输入的 2 个麦克风。
我发现这个解决方案这描述了我的问题,但 Fedora 35 没有default.pa
文件:
In the /etc/pulse/default.pa file, comment out this line:
load-module module-suspend-on-idle
看来这只是默认的脉冲音频行为,本质上是试图通过“调暗”闲置时间“太长”的音频源来节省资源。我还没有真正计时来弄清楚“太长”有多长,但是通过上面的更改,无论如何都没关系
Fedora 35 的等效版本是什么?
事实上,如果我在另一次录音后立即开始录音,则不会出现淡入,但流行声仍然存在。
我找到了pipewire-pulse systemd
用户单位,但没有明显的设置:
[Unit]
Description=PipeWire PulseAudio
# We require pipewire-pulse.socket to be active before starting the daemon, because
# while it is possible to use the service without the socket, it is not clear
# why it would be desirable.
#
# A user installing pipewire and doing `systemctl --user start pipewire-pulse`
# will not get the socket started, which might be confusing and problematic if
# the server is to be restarted later on, as the client autospawn feature
# might kick in. Also, a start of the socket unit will fail, adding to the
# confusion.
#
# After=pipewire-pulse.socket is not needed, as it is already implicit in the
# socket-service relationship, see systemd.socket(5).
Requires=pipewire-pulse.socket
ConditionUser=!root
Wants=pipewire.service pipewire-session-manager.service
After=pipewire.service pipewire-session-manager.service
Conflicts=pulseaudio.service
[Service]
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
RestrictNamespaces=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
Type=simple
ExecStart=/usr/bin/pipewire-pulse
Restart=on-failure
Slice=session.slice
[Install]
Also=pipewire-pulse.socket
WantedBy=default.target
journalctl
显示这个:
dez 31 15:21:15 d3.localdomain plasmashell[2950304]: 15:21:15: Debug: AudioIO::GetBestRate() for playback
dez 31 15:21:15 d3.localdomain plasmashell[2950304]: 15:21:15: Debug: GetBestRate() suggested rate 44100 Hz
dez 31 15:21:15 d3.localdomain plasmashell[2950304]: 15:21:15: Debug: GetBestRate() Returning 44100 Hz
Plasma 会增加延迟吗?
$ systemctl --user status session.slice
● session.slice - User Core Session Slice
Loaded: loaded (/usr/lib/systemd/user/session.slice; static)
Active: active since Sat 2022-01-01 10:14:18 -03; 29min ago
Docs: man:systemd.special(7)
Tasks: 95
Memory: 638.7M
CPU: 38.748s
CGroup: /user.slice/user-1000.slice/[email protected]/session.slice
├─at-spi-dbus-bus.service
│ ├─2403 /usr/libexec/at-spi-bus-launcher
│ ├─2409 /usr/bin/dbus-broker-launch --config-file=/usr/share/defaults/at-spi2/accessibility.conf --scope user
│ └─2410 dbus-broker --log 4 --controller 9 --machine-id 938e97f50c4f42609f51bf4ed43fe113 --max-bytes 100000000>
├─dbus-broker.service
│ ├─1818 /usr/bin/dbus-broker-launch --scope user
│ └─1821 dbus-broker --log 4 --controller 11 --machine-id 938e97f50c4f42609f51bf4ed43fe113 --max-bytes 10000000>
├─gvfs-daemon.service
│ └─1862 /usr/libexec/gvfsd
├─gvfs-metadata.service
│ └─4700 /usr/libexec/gvfsd-metadata
├─pipewire-pulse.service
│ └─1804 /usr/bin/pipewire-pulse
├─pipewire.service
│ └─1802 /usr/bin/pipewire
├─plasma-kded.service
│ ├─2030 /usr/bin/kded5
│ ├─4242 /usr/libexec/kf5/kioslave5 /usr/lib64/qt5/plugins/kf5/kio/kio_file.so file "" local:/run/user/1000/kde>
│ └─4244 /usr/libexec/kf5/kioslave5 /usr/lib64/qt5/plugins/kf5/kio/kio_file.so file "" local:/run/user/1000/kde>
├─plasma-ksmserver.service
│ └─2028 /usr/bin/ksmserver
├─plasma-kwin_x11.service
│ └─2033 /usr/bin/kwin_x11 --replace
├─plasma-plasmashell.service
│ ├─2071 /usr/bin/plasmashell --no-respawn
│ ├─2678 /usr/bin/ksysguardd
│ └─2843 /usr/libexec/kf5/kio_http_cache_cleaner
├─wireplumber.service
│ └─1803 /usr/bin/wireplumber
├─xdg-desktop-portal.service
│ └─2441 /usr/libexec/xdg-desktop-portal
└─xdg-document-portal.service
├─2445 /usr/libexec/xdg-document-portal
└─2453 fusermount -o rw,nosuid,nodev,fsname=portal,auto_unmount,subtype=portal -- /run/user/1000/doc