ReSpeaker Mic Array v2.0 AEC issue

Hello, I am using the mic for smart-speaker application.

Microphone is connected to a single board computer via USB. Sound system is connected to 3.5mm audio jack on the microphone for AEC to work. Below is the demonstration of setup:
I have watched your video showing the AEC performance, and it seems very good. I hoped that I will have similar results, but unfortunately microphone recording gets distorted by the signal emitted through speaker more than on your video. When I compared recording of single-channel firmware vs the first-channel of 6-channel firmware(processed for AEC), the quality of the latter is much better. But still it is not sufficient. I need to understand what is wrong with my setup, and why it doesn’t work as in your video.

For my application I am using Linux, and this is what I do for audio settings:

pactl load-module module-remap-source master=alsa_input.usb-SEEED_ReSpeaker_4_Mic_Array__UAC1.0_-00.multichannel-input master_channel_map=front-left channel_map=front-left remix=false pactl set-default-sink alsa_output.usb-SEEED_ReSpeaker_4_Mic_Array__UAC1.0_-00.analog-stereo pactl set-default-source alsa_input.usb-SEEED_ReSpeaker_4_Mic_Array__UAC1.0_-00.multichannel-input.remapped

Through this, I make sure that only the first channel is used for my voice detection application(clear of noise), and that audio output is streamed into the microphone for the filtering purpose.

  • Below are various logs from pulse-audio regarding sampling rate and etc. Could you please check if it they are ok for good AEC performance?
  • What can I do to improve the noise cancellation?
  • May it be that amplifier induces a delay which worsens the filtering? If yes, what would you suggest?
  • Which tuning parameters could help?

from pacmd stat:

Default sample spec: s16le 2ch 44100Hz
Default channel map: front-left,front-right
Default sink name:
Default source name: alsa_input.usb-SEEED_ReSpeaker_4_Mic_Array__UAC1.0_-00.ichannel-input.remapped

from pacmd list-sources:

  • index: 5
    name: <alsa_input.usb-SEEED_ReSpeaker_4_Mic_Array__UAC1.0_-00.multichannel-input.remapped>
    driver: <module-remap-source.c>
    state: RUNNING
    suspend cause: (none)
    priority: 1000
    volume: front-left: 65536 / 100% / 0.00 dB
    balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 1.03 ms
    max rewind: 0 KiB
    sample spec: s16le 1ch 16000Hz
    channel map: front-left
    used by: 2
    linked by: 2
    configured latency: 8.69 ms; range is 0.50 … 2000.00 ms
    module: 25
    device.master_device = “alsa_input.usb-SEEED_ReSpeaker_4_Mic_Array__UAC1.0_-00.multichannel-input”
    device.class = “filter”
    device.description = “Remapped ReSpeaker 4 Mic Array (UAC1.0) Multichannel”
    device.icon_name = “audio-input-microphone”

from pacmd list-sinks:

  • index: 1
    name: <alsa_output.usb-SEEED_ReSpeaker_4_Mic_Array__UAC1.0_-00.analog-stereo>
    driver: <module-alsa-card.c>
    state: SUSPENDED
    suspend cause: IDLE
    priority: 9549
    volume: front-left: 55000 / 84% / -4.57 dB, front-right: 55000 / 84% / -4.57 dB
    balance 0.00
    base volume: 65536 / 100% / 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 2
    sample spec: s24le 2ch 16000Hz
    channel map: front-left,front-right
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 … 2000.00 ms
    card: 1 <alsa_card.usb-SEEED_ReSpeaker_4_Mic_Array__UAC1.0_-00>
    module: 8
    alsa.resolution_bits = “24”
    device.api = “alsa”
    device.class = “sound”
    alsa.class = “generic”
    alsa.subclass = “generic-mix” = “USB Audio” = “USB Audio”
    alsa.subdevice = “0”
    alsa.subdevice_name = “subdevice #0
    alsa.device = “0”
    alsa.card = “0”
    alsa.card_name = “ReSpeaker 4 Mic Array (UAC1.0)”
    alsa.long_card_name = “SEEED ReSpeaker 4 Mic Array (UAC1.0) at usb-fe3e0000.usb-1, full speed”
    alsa.driver_name = “snd_usb_audio”
    device.bus_path = “platform-fe3e0000.usb-usb-0:1:1.0”
    sysfs.path = “/devices/platform/fe3e0000.usb/usb4/4-1/4-1:1.0/sound/card0” = “usb-SEEED_ReSpeaker_4_Mic_Array__UAC1.0_-00”
    device.bus = “usb” = “2886” = “SEEED” = “0018” = “ReSpeaker 4 Mic Array (UAC1.0)”
    device.serial = “SEEED_ReSpeaker_4_Mic_Array__UAC1.0_”
    device.form_factor = “speaker”
    device.string = “front:0”
    device.buffering.buffer_size = “192000”
    device.buffering.fragment_size = “96000”
    device.access_mode = “mmap+timer” = “analog-stereo”
    device.profile.description = “Analog Stereo”
    device.description = “ReSpeaker 4 Mic Array (UAC1.0) Analog Stereo”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-speakers-usb”
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
 active port: <analog-output>

P.S. If you want I can make a video which shows performance on audacity.

@Citric Can you help please? May it be because of stereo sink?

Sorry, I don’t know much about this product, you can try describing the problem to the technical support email and one of our engineers will help you.

Hi Citric.

Thank you for your reply.

I wrote to technical support and this is what they wrote:

we haven’t changed it since 2018*(software)*. We no longer maintain all software related parts of the product, which is sold as hardware only.

So, I don’t think they will help.

I don’t know who else I can contact.

My question is more about set-up rather than SW.

I just need someone from seeedstudio to review my Linux settings and tell if they are correct for proper AEC work.

The output signal(sink) that is fed to mic is 24 bit & stereo, while the microphone has single channel(the first channel from six channels is used) and is 16 bit. May it be the reason for bad performance?