Skip to content
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

单mic机型实现aec(回声消除)的可行性 #216

Open
ACI0419 opened this issue Feb 21, 2025 · 3 comments
Open

单mic机型实现aec(回声消除)的可行性 #216

ACI0419 opened this issue Feb 21, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@ACI0419
Copy link

ACI0419 commented Feb 21, 2025

Is your feature request related to a problem?

我之前在群里面反馈了1.2.1版本 面包板 s3 wakenet aec(语音唤醒回声消除)不生效的问题。

Describe the solution you'd like.

我仔细研究了一下代码,发现这个项目目前只有双mic的机型支持这个功能。如果我没看错的话,aec ref似乎是使用双mic的其中一个,另一个作为输入。但是根据我查的资料,aec ref可以直接从扬声器i2s回采,不需要通过麦克风也能获取ref。也就是说,单mic也可以做回声消除。希望后续可以新增这个功能

Describe alternatives you've considered.

No response

Additional context.

我本来想直接在这个项目上验证我的想法,但是我目前还不是很熟悉这个项目(感觉这个项目二次开发的文档真挺少的,注释也不多)。花了一整天的时间才摸清项目结构定位到问题 XP

@ACI0419 ACI0419 added the enhancement New feature or request label Feb 21, 2025
@78
Copy link
Owner

78 commented Feb 21, 2025

从硬件上做回采效果会更好,功放也会改变音频数据,所以拿到功放之后的数据效果应该是最好的。
之前有做过实验,基于esp-box-3,大概步骤是:

  1. 把opus complexity设为0释放出更多CPU。
  2. 使用BoxAudioCodec,开启reference
  3. 把audio processing的aec打开
  4. 最后,还要修改speaking的时候,注释掉audio_processor_.Stop。

差不多这样,太久了都忘了。效果:https://www.bilibili.com/video/BV1vx1AYQEhZ/

@ACI0419
Copy link
Author

ACI0419 commented Feb 22, 2025

希望后续版本的menuconfig可以把wakeupNet和AudioProcess这两个分开,然后wakeupNet具体使用mic回采还是扬声器i2s回采也可以选择,这样没有双mic的机型也能用上aec

@78
Copy link
Owner

78 commented Feb 22, 2025

是可以的,欢迎提交代码!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants