Hallo,
seit Tagen flatter ich wie ein blindes Huhn herum, ohne ein Korn zu finden.
Es geht um den Bau eine Türsprechstelle. Es gibt dazu ein Projekt Namens "DoorPi". Das Problem ist ein Echo bei der Sprachverbindung, d. h., ich höre mich am Fritzfon selber mit einer Verzögerung von 1 ... 2 s. Dies soll mit der echo-cancellation von pulseaudio elemenierbar sein.
Anleitung von User-phx zur echo cancellation in DoorPi
Ein anderer User hat dies in diesem Forum bereist thematisiert, ich sehe dabei aber am Ende keine Lösung, bzw. habe ich eine andere Audio-Karte und eine Fritzbox.
Thema bereits hier im Forum behandelt, Ende offen
Ich habe jetzt unzählige Seiten im Internet gelesen und auch die eine oder andere Offenbahrung erhalten - jedoch bleibt das Echo. Ich habe das Gefühl, dass die Anwendung DoorPi in Verbindung mit ALSA gar nicht auf die echo-cancellation von pulseaudio zugreift sondern direkt an die Soundkarte ausgibt.
Die Anwendung DoorPi greift auf "ALSA: default device" zu. Nach meinem Verständnis ist dort pulseaudio hinterlegt. Innerhalb von pulseaudio geht das Signal an das Modul "module-echo-cancel". Dieses bereinigt das Signal und stellt es mit "set-default-sink doorpisink" und "set-default-source doorpisource" ALSA wieder zur Verfügung. Ich habe keinen blassen Schimmer, auf welchen Weg das Signal zur AudioCard gelangt.
Hier ein paar Angaben:
Hardware:
Raspberry Pi 4, IQaudIO Codec Zero mit externem Mic und Visaton Lautsprecher (Mono)
WLAN-Anbindung, Fritzbox und FritzFon C5
Software:
pi@DoorPiSv:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Hostname DoorPiSv
Codename: bullseye
pi@DoorPiSv:~ $ uname -a
Linux DoorPiSv 5.15.32-v7+ #1538 SMP Thu Mar 31 19:38:48 BST 2022 armv7l GNU/Linux
pi@DoorPiSv:~ $ dpkg -l | grep pulseaudio
ii pulseaudio 14.2-2+rpi1 armhf PulseAudio sound server
ii pulseaudio-utils 14.2-2+rpi1 armhf Command line tools for the PulseAudio sound server
pi@DoorPiSv:~ $ doorpi_cli --version
VoIP Door-Intercomstation with Raspberry Pi 2.5.1
Als sinks und sources werden mir im Terminal angezeigt:
pi@DoorPiSv:~ $ sudo pactl list short sinks
0 alsa_output.platform-soc_sound.stereo-fallback module-alsa-card.c s16le 2ch 16000Hz SUSPENDED
1 doorpisink module-echo-cancel.c float32le 2ch 16000Hz SUSPENDED
pi@DoorPiSv:~ $ sudo pactl list short sources
0 alsa_output.platform-soc_sound.stereo-fallback.monitor module-alsa-card.c s16le 2ch 16000Hz SUSPENDED
1 alsa_input.platform-soc_sound.stereo-fallback module-alsa-card.c s16le 2ch 16000Hz SUSPENDED
2 doorpisource module-echo-cancel.c float32le 2ch 16000Hz SUSPENDED
3 doorpisink.monitor module-echo-cancel.c float32le 2ch 16000Hz SUSPENDED
pi@DoorPiSv:~ $ sudo pactl list short modules
0 module-device-restore
1 module-stream-restore
2 module-card-restore
3 module-udev-detect
4 module-alsa-card device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"
5 module-native-protocol-unix
6 module-default-device-restore
7 module-always-sink
8 module-suspend-on-idle
9 module-position-event-sounds
10 module-echo-cancel sink_master=alsa_output.platform-soc_sound.stereo-fallback source_master=alsa_input.platform-soc_sound.stereo-fallback aec_method=webrtc sink_name=doorpisink source_name=doorpisource use_master_format=true aec_args="analog_gain_control=false digital_gain_control=false noise_suppression=false high_pass_filter=false mobile=true routing_mode=loud-speakerphone comfort_noise=false"
In der Datei system.pa sind dementsprechend folgende Befehle eingetragen
### echo cancellation
load-module module-echo-cancel sink_master=alsa_output.platform-soc_sound.stereo-fallback source_master=alsa_input.platform-soc_sound.stereo-fallback aec_method=webrtc sink_name=doorpisink source_name=doorpisource use_master_format=true aec_args="analog_gain_control=false digital_gain_control=false noise_suppression=false high_pass_filter=false mobile=true routing_mode=loud-speakerphone comfort_noise=false"
set-default-sink doorpisink
set-default-source doorpisource
Gemäß aplay -L ist PulseAudio als default eingetragen
pi@DoorPiSv:~ $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default
Playback/recording through the PulseAudio sound server
lavrate
Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
Rate Converter Plugin Using Samplerate Library
speexrate
Rate Converter Plugin Using Speex Resampler
jack
JACK Audio Connection Kit
oss
Open Sound System
pulse
PulseAudio Sound Server
upmix
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
hw:CARD=IQaudIOCODEC,DEV=0
IQaudIOCODEC, IQaudIO CODEC HiFi v1.2 da7213-hifi-0
Direct hardware device without any conversions
plughw:CARD=IQaudIOCODEC,DEV=0
IQaudIOCODEC, IQaudIO CODEC HiFi v1.2 da7213-hifi-0
Hardware device with all software conversions
sysdefault:CARD=IQaudIOCODEC
IQaudIOCODEC, IQaudIO CODEC HiFi v1.2 da7213-hifi-0
Default Audio Device
dmix:CARD=IQaudIOCODEC,DEV=0
IQaudIOCODEC, IQaudIO CODEC HiFi v1.2 da7213-hifi-0
Direct sample mixing device
usbstream:CARD=IQaudIOCODEC
IQaudIOCODEC
USB Stream Output
pi@DoorPiSv:~ $ aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: IQaudIOCODEC [IQaudIOCODEC], Gerät 0: IQaudIO CODEC HiFi v1.2 da7213-hifi-0 [IQaudIO CODEC HiFi v1.2 da7213-hifi-0]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
pi@DoorPiSv:~ $ sudo amixer info
Card default 'pulse'/'PulseAudio'
Mixer name : 'PulseAudio'
Components : ''
Controls : 4
Simple ctrls : 2
Was mache ich falsch? Ist ein default falsch eingetragen?
Vielen Dank im Voraus
Schorsch