简体   繁体   English

android speex mp3文件回声消除

[英]android speex mp3 file echo cancellation

I'm working on an application which is recording the microphone's input and at the same time has to be able to play an MP3 file via Loudspeakers. 我正在开发一个应用程序,该应用程序正在记录麦克风的输入,同时必须能够通过扬声器播放MP3文件。

I need to cancel the echo of the MP3 file. 我需要取消MP3文件的回声。 I've tried to use AcousticEchoCanceler, but it didn't work. 我尝试使用AcousticEchoCanceler,但是没有用。

Now i've integrated speex library in my project. 现在,我已经在项目中集成了speex库。 EchoCanceller function interface looks like this: EchoCanceller函数界面如下所示:

public native static short[] process(short[] inputFrame, short[] echoFrame);

The problem is i don't know how to get "echoFrame" (data of currently playing MP3 file). 问题是我不知道如何获取“ echoFrame”(当前正在播放的MP3文件的数据)。 I'm using MediaPlayer to play it. 我正在使用MediaPlayer播放它。

Is it possible to cancel echo from an MP3 file? 是否可以取消MP3文件中的回声? Or i must convert MP3 to PCM and play it via SoundTrack? 还是我必须将MP3转换为PCM并通过SoundTrack播放? Thanks for reading. 谢谢阅读。

As far as I know, You should use PCM. 据我所知,您应该使用PCM。 The AEC does not work on a compressed audio format. AEC不适用于压缩的音频格式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM