使用本机库在 Flash/Flex 中消除回声
我必须在 Flex 视频会议应用程序中实现 AEC。我知道这不能直接在Flash中完成。我正在考虑编写一个本机应用程序或库来在 Flex 之外执行 AEC。
据我所知 Adobe Connect Pro 正在使用一些执行 AEC 的外部库。我想遵循这个方向并做类似的事情。
我想到了两种可能性:
1)独立定制AEC滤波器。
自定义 AEC 过滤器将在后台运行,处理来自麦克风和声卡的所有数据并执行 AEC。回声信号将是要播放但在临时缓冲区中延迟的数据,如下所示:aec(输入,延迟输入,输出)。
我不知道它是否有效,因为 Flash 麦克风输入不知道我的自定义输入,扬声器也是如此。但是在系统级别具有 AEC 的 WinXP/Vista 中是如何完成的呢?
2) AEC 过滤器与 Flex 的 NativeProcess 交互。
该过滤器将由 NativeProcess 运行。 Flex 应用程序会将麦克风声音、接收到的远程语音传递到滤波器并返回消除回声的语音,然后 Flex 会将其输出到扬声器。会是正确的吗?
如果2)方法没问题,那么我有以下问题:
- 我将从Speex的AEC开始,那么从Flex传递的数据应该采用什么格式?如果我选择 Flex Speex 编解码器进行声音压缩,我可以将其直接传递到 speex 库吗?
- 性能会好吗?我认为在每个声音帧缓冲区中调用 NativeProcess 库可能非常耗时。
- 为什么AS3中没有可以直接从Flash使用的AEC实现?据我所知,要执行 AEC,您必须拥有回声数据和麦克风数据(在 Flash 10 中可以直接访问麦克风)。肯定有一些东西正在停止这样做,但我还不知道它是什么:)
- 是否有一些免费的 AEC 实现或除 Speex 之外的 DSP 库可供我使用?
PS 我现在是 Flash/Flex 专家,很抱歉提出一些愚蠢的问题:)
提前感谢您的帮助, 特尔尼克
I have to implement AEC in Flex video conferencing application. I know that it can not be done directly in Flash. I'm thinking to write a native application or library that will do AEC outside Flex.
As far I know Adobe Connect Pro is using some external library that do AEC. I'd like to follow this direction and do something similiar.
There comes two possibilities in my mind:
1) Independend custom AEC filter.
The custom AEC filter will be run in the background and will be processing all data from microphone and sound card and doing AEC. The echo signal will be the data that is to be played but delayed in a temporary buffer, something like this: aec(input, delayed_input, output).
I don't know if it work, because Flash microphone input doesn't know about my custom input and the same with the speakers. But how it is done in WinXP/Vista that have AEC at the system level?
2) AEC filter interacting with Flex's NativeProcess.
The filter will be run by NativeProcess. Flex app will pass microphone sound, received remote voice to the filter and return voice with echo removed and then Flex will output this to the speakers. Will it be correct?
If the 2) method is OK then I have following questions:
- I will start with Speex's AEC so in what format should be the data pased from Flex? If I choose Flex Speex codec for sound compression can I pass it directly to the speex library?
- Will be the performance OK? Calling NativeProcess library every sound frame buffer can be time consuming I think.
- Why there is no AEC implementation in AS3 that can be used directly from Flash? As far I know to do AEC you must have echo data and microphone data (in Flash 10 there is direct access to the microphone). There is definetly something that is stopping doing it like this but I don't know what it is yet :)
- Is there some free AEC implementation or a DSP library with in except Speex's that I can use?
PS I'm now a Flash/Flex expert so sorry for some stupid questions :)
Thank in advance for help,
ternyk
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好消息 - 它现在内置于 Flash Player 10.3 中:) 阅读发行说明并确保针对 Flex 4.5 SDK 进行编译
Good news - it's built into Flash Player 10.3 now :) Read the release notes and make sure to compile against Flex 4.5 SDK
在 Java 中,AEC 是可能的,您可以使用 Merpi 访问 AIR 中的 java 功能。
也许你应该尝试这个。
谢谢
In Java AEC is Possible and you can access java functionalities in AIR using Merpi.
May be you should try this.
Thanks