-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Echo cancellation #10
Comments
There's no echo cancellation built into ESP32, you'll need to find an external AEC library like https://www.espressif.com/en/solutions/audio-solutions/esp-afe. |
We can refer to these examples to implement the echo cancellation functionality. https://github.com/espressif/esp-skainet/tree/master/examples |
hey all, I tried echo cancellation (AEC) via ESP-AFE but its too slow for realtime needs. I think the esp32s3 chipset is not capable of doing wifi+realtime audio+ noise cancellation all at the same time. were any of you successful in accomplishing noise cancellation? |
@nischalj10 can you share your code ? I can try to run AEC on one core and webrtc on the other |
I have tested the AEC algorithm of ESP before. CPU usage is less than 20% of a single core. Do you have any tests in this area. |
hey @RASPIAUDIO - i have done a simple from scratch implementation of just aec (without realtime webrtc) on my setup and that also does not seem to work. here's the project. here's my hardware details -
could you try to run this and mod it so it works? |
hey @shenxiaozheng, is it possble to share your implementation, maybe i have missed something here? |
https://github.com/nischalj10/aec-test/blob/main/main/aec_handler.h |
hey @shenxiaozheng , thanks for the suggestion! i have updated the code and it works now. will try to port the configuration of this test repo to my original codebase with openai-realtime and see how it does. |
@nischalj10 Yes, using SR is correct. Looking forward to your great work. |
update : as i try to do the port, i notice a fundamental issue. the opus encoder expects 20ms (BUFFER_SIZE=320) chunks of audio, while aec expects 32ms (BUFFER_SIZE=512) - and we can't change this for either of them. we will need to maintain ring buffers to get this working properly. have been unsuccessful today in getting it to work. |
@nischalj10 Yes, the frame length of the encoding and decoding algorithm is not consistent with that of the AEC algorithm. By increasing the buffer, they can work together. |
Hello, I used the awakened SR to do echo cancellation, but when the distance between the speaker and the microphone is relatively close, there will still be a situation of asking yourself and answering yourself, how to optimize it? |
Yue Xin official seems to support OPUS codec, maybe use this will be useful? Have you tried it? |
|
好的谢谢,目前我只加入了aec并且测试了其是否生效,nsnet还没使用,我会在年后进行一个测试,nsnet支持adf框架吗? |
@PoohWoah , 您能否分享一下您如何处理 opus 编码的 320 缓冲区长度和 AEC 的 512 缓冲区长度之间的不匹配。我目前创建了两个单独的任务来执行此操作 - 一个将麦克风数据输入 AEC,另一个从中获取。 |
我很乐意,但是我目前已经在假期了。恐怕需要等我过完春节才可以发你,不过我具体代码可能帮不到你太多,或许对你有用。
…---Original---
From: "Nischal ***@***.***>
Date: Fri, Jan 24, 2025 18:27 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [openai/openai-realtime-embedded-sdk] Echo cancellation (Issue#10)
@PoohWoah , 您能否分享一下您如何处理 opus 编码的 320 缓冲区长度和 AEC 的 512 缓冲区长度之间的不匹配。我目前创建了两个单独的任务来执行此操作 - 一个将麦克风数据输入 AEC,另一个从中获取。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
谢谢你! |
I made it work on the ESP32 S3 Muse Radio but it’s picking up it’s own response, I think webrtc has built-in noise cancellation but how to activate it?
https://www.youtube.com/watch?v=Q9BVurtly_M&embeds_referring_euri=https%3A%2F%2Fcommunity.openai.com%2F&source_ve_path=Mjg2NjY
The text was updated successfully, but these errors were encountered: