Respeaker Lite AEC support

I don’t think this is the right way to test AEC.

2 Likes

@jiewei.ye I can follow up with pictures and wav files. However in the meantime, you can clearly see what’s happening in the recordings from the two screenshots I posted previously.

With the 2.0.6 and 2.0.7 firmware, the audio recorded on both channels is identical.

With your custom ffva_ua_v2.0.6_output_proc0_ref0.bin firmware, channel 0 has raw mic input, and channel 1 is nearly silent.

In these tests, I have the ReSpeaker 4-6 inches away from the 5W 8ohm speaker, with the speaker facing away, at low volume. There is essentially zero vibration. I have tried putting the ReSpeaker on a piece of foam to further reduce any possibility of vibration. Nothing makes any difference.

To test, I have connected via USB to both a Macbook and a Raspberry Pi. I am recording mic audio while talking, and playing music quietly through the ReSpeaker.

Given that other people have reported exactly the same results, I think it’s reasonable to conclude that the firmware is buggy. I have read that the AEC works correctly when connecting via I2C and using the I2C firmware, so this problem appears specific to the USB firmware.

Hi @SoulAuctioneer ,

  1. The difference between firmware v2.0.6 and v2.0.7 is that v2.0.7 supports a new external flash.
  2. The difference between v2.0.6 and the firmware ffva_ua_v2.0.6_output_proc0_ref0.bin is that in v2.0.6, both channel 0 and channel 1 output the processed audio(processed by audio front-end algorithm, including AEC and AGC). However, in ffva_ua_v2.0.6_output_proc0_ref0.bin, channel 0 outputs the processed audio, while channel 1 outputs the raw audio captured by one of the microphone2. You can find that the volume of channel1 is much lower thant channel0, because the AGC algorithm doesn’t process this channel.
  3. The purpose of releasing the ffva_ua_v2.0.6_output_proc0_ref0.bin firmware is to compare the results before and after AEC processing. Just like what I posted before Respeaker Lite AEC support - #8 by jiewei.ye

Returning to your question, “why does the the AEC is not working on my board?”, can I just copy the test environment of yours and test it on my side? I need the background music in your tests and a picture of the postions of the respeaker lite and speaker. And I will very appreciate that if you can provide your test recordings for me to analyze.

Hi all,

I conducted some tests on AEC over the USB interface. My experience is that AEC works well when the playback WAV file contains dense musical content (e.g., the Star Trek main title). In this case, the processed audio (from the far end) maintains a low amplitude.

However, AEC does not seem to work when the playback consists solely of speech, especially if it is slowly spoken with pauses. I believe the issue with spoken words is that AGC increases the capture signal, sometimes amplifying the recorded voice to its maximum level. I think the AGC is too aggressive and cannot be modified.

I have tested the board with the USB connection. The AEC is kind of work but not perfect, as the result there is still some echo can be heard on the recording. The weird thing is that my voice LLM someone did not pickup the echo and sometimes it did. My only explanation is that i might have moved the speaker around. Am I right that the AEC quality will depend on where the speaker is? And even a slight change in the speaker position may affect the AEC?

If that is correct, is there some parameters that i can control to fine tune the AEC?

@jiewei.ye
I have tested both with both ffva_ua_v2.0.6 and 2.0.7 and can confirm that:

  1. for ffva_ua_v2.0.6, one channel is complete off and the other has no AEC at all
  2. for 2.0.7, AEC is not working in both channels.

Sorry being a new member, I cannot upload files.

Hi,

I’ve made some adjustments to the AEC part and would like to invite you to try out this new firmware.
ffva_ua_v2.0.8_test.bin.zip (151.6 KB)

From my testing over the past few months, I’ve found that the frequency response of the speaker can have a significant impact on the AEC results. If a speaker has an additional equalizer, the sound it produces will differ from the sound in the reference channel. This discrepancy prevents the AEC algorithm from correctly canceling out the sound in the reference channel, which is why it affects the AEC performance. To ensure good AEC performance, it’s best to use speakers without additional equalizers. (If you’re unsure whether your speaker has an equalizer, I can say that most inexpensive Bluetooth speakers with AUX interfaces have equalizers to make their sound more pleasant. Choosing a speaker with a relatively flat frequency response curve and no built-in amplifier, and connecting it to the ReSpeaker Lite via a JST2.0 interface, might be a good option.)

Additionally, if you have any doubts about the AEC performance, you can provide a recording file or a spectrogram screen of the recordings. These are effective ways to debug the issue.

Thanks

Hi hamstie,

The v2.0.8 test firmware seems to work better with the “speech” playback. Would you mind testing it again?

I have tested this. Here are the original and 2.0.8_test. AEC did work but did not completely remove the echo. I wonder if the noise level has to do with it. The mic still pick up a lot of noise. Is there a way to control the AGC and ANC.

original.wav.zip (603.2 KB)
test_aec_2.0.8.wav.zip (552.7 KB)

Hi,

These are my test recordings of playing the same “original.wav” as yours.
test_aec_2.0.8_with_humanspeaking.wav.zip (1.7 MB)
test_aec_2.0.8_without_humanspeaking.wav.zip (1.3 MB)

First, check my recordings. You can open these WAV files of the recordings with Audacity and then choose to view their spectrograms. The following figure is the spectrogram of test_aec_2.0.8_with_humanspeaking.wav.


It can be seen (or heard) that it takes about 5 seconds from the start of playback in a quiet state to the noticeable suppression, and it takes about 10 seconds to completely suppress (of course, this time may vary depending on the echo reflection path of the usage environment. I tested it on my office desk, which has some clutter around it). From this recording, you can hear that my voice is still very clear.
However, when I listened to your recording, I found it rather “blurry,” as if something was covering the microphone. Did you test with the microphones facing the table as shown in the photo you provided? If so, could you try turning the ReSpeaker over and using a small box to prop it up a bit for testing? This is my setup:

1 Like