Christopher Adoremos
2010-Sep-30 04:51 UTC
[Speex-dev] [SPAM] [BombData][alltestmode] Using Speex Echo Canceller
Hi Anton Thanks for the info... What if I use this function do I still need to sync the playback and capture? Assuming that the captured voice (*rec) already contains the echo which I need to cancel out... -------------------------------- void speex_echo_capture (SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out) Parameters: st Echo canceller state rec signal from the microphone (near end + far end echo) out Returns near-end signal with echo removed ---------------------------------- thanks & regards, Chris Adoremos On Wed, Sep 29, 2010 at 5:46 PM, Anton A. Shpakovsky <saa at tomsksoft.com>wrote:> Hi > > > > Yes, it's absolutely unnecessary to use speex codec. You can encode the > echo cancelled auido data with any codec you want. > > The Echo Canncelation API is here - > http://www.speex.org/docs/api/speex-api-reference/group__SpeexEchoState.html > > I would advice you to look at *speex_echo_cancellation** *function but you > will have to sync playback and capture streams by yourself. > > > > I've used GSM, iLBC and Speex codecs with Speex AEC and it works fine. > > > > Best Regards, > > Anton A. Shpakovsky > > > > > > *From:* speex-dev-bounces at xiph.org [mailto:speex-dev-bounces at xiph.org] *On > Behalf Of *Christopher Adoremos > *Sent:* Wednesday, September 29, 2010 4:39 PM > *To:* speex-dev at xiph.org > *Cc:* jean-marc.valin at usherbrooke.ca > *Subject:* [SPAM] [BombData][alltestmode] [Speex-dev] Using Speex Echo > Canceller > > > > Hi > > > > Is it possible to use only the speex echo cancellation module w/o using the > speex codec? > > > > Here's the scenario: > > 1. I have my voice recorded in PCM audio file format > > 2. I want to cleanup the recorded voice by removing any echo included in > the audio file/buffer > > 3. can I just use the ff APIs? > > - SpeexEchoState* speex_echo_state_init() > > - int speex_echo_ctl() > > - void speex_echo_capture() > > 4. then, will it be possible to encode the output buffer from > speex_echo_capture() to any codec? > > Like G711? GSM? etc.... > > > > I'm quite new to audio format concepts/development, so if you have any > ideas your advice is highly appreciated.. > > > > Thanks in advance > > Chris A >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20100930/a51da847/attachment.htm
Anton A. Shpakovsky
2010-Sep-30 07:00 UTC
[Speex-dev] [SPAM] [BombData][alltestmode] Re: [SPAM] [BombData][alltestmode] Using Speex Echo Canceller
Hi So in your case if you don't want to use speex_echo_cancellation than you should do next way: Save the playback frames (clean echo) within separate playback thread with speex_echo_playback func. Then use speex_echo_capture - it will remove the clean echo frame (saved with speex_echo_playback func) from const spx_int16_t *rec buffer (saved with speex_echo_capture) and you will get clean frame in "out" buffer. The sync is very important - because speex_echo_capture won't be able to remove clean echo frame that you didn't provide with speex_echo_playback. I hope I didn't messed up anything :) Best Regards, Anton A. Shpakovsky From: Christopher Adoremos [mailto:chrisadoremos at gmail.com] Sent: Thursday, September 30, 2010 11:52 AM To: Anton A. Shpakovsky Cc: speex-dev at xiph.org Subject: [SPAM] [BombData][alltestmode] Re: [SPAM] [BombData][alltestmode] [Speex-dev] Using Speex Echo Canceller Hi Anton Thanks for the info... What if I use this function do I still need to sync the playback and capture? Assuming that the captured voice (*rec) already contains the echo which I need to cancel out... -------------------------------- void speex_echo_capture (SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out) Parameters: st Echo canceller state rec signal from the microphone (near end + far end echo) out Returns near-end signal with echo removed ---------------------------------- thanks & regards, Chris Adoremos On Wed, Sep 29, 2010 at 5:46 PM, Anton A. Shpakovsky <saa at tomsksoft.com> wrote: Hi Yes, it's absolutely unnecessary to use speex codec. You can encode the echo cancelled auido data with any codec you want. The Echo Canncelation API is here - http://www.speex.org/docs/api/speex-api-reference/group__SpeexEchoState. html I would advice you to look at speex_echo_cancellation function but you will have to sync playback and capture streams by yourself. I've used GSM, iLBC and Speex codecs with Speex AEC and it works fine. Best Regards, Anton A. Shpakovsky From: speex-dev-bounces at xiph.org [mailto:speex-dev-bounces at xiph.org] On Behalf Of Christopher Adoremos Sent: Wednesday, September 29, 2010 4:39 PM To: speex-dev at xiph.org Cc: jean-marc.valin at usherbrooke.ca Subject: [SPAM] [BombData][alltestmode] [Speex-dev] Using Speex Echo Canceller Hi Is it possible to use only the speex echo cancellation module w/o using the speex codec? Here's the scenario: 1. I have my voice recorded in PCM audio file format 2. I want to cleanup the recorded voice by removing any echo included in the audio file/buffer 3. can I just use the ff APIs? - SpeexEchoState* speex_echo_state_init() - int speex_echo_ctl() - void speex_echo_capture() 4. then, will it be possible to encode the output buffer from speex_echo_capture() to any codec? Like G711? GSM? etc.... I'm quite new to audio format concepts/development, so if you have any ideas your advice is highly appreciated.. Thanks in advance Chris A -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20100930/781f8328/attachment-0001.htm
Christopher Adoremos
2010-Sep-30 11:17 UTC
[Speex-dev] [SPAM] [BombData][alltestmode] Re: [SPAM] [BombData][alltestmode] Using Speex Echo Canceller
Hi Anton Thanks again for the tips... its worth a try... =) I know now how to proceed... 1. From playback thread I need to save the clean buffer/frame via * speex_echo_playback()* 2. In the audio recorder thread, I'll read a new buffer/frame(which might include far-end+echo fragments) 3. Then I'll use the *speex_echo_capture()* to cancel out the echo fragment coming from the playback buffer 4. The resulting *"out"* buffer contains the cleaned frame which in turn I'll use to encode to my target codec, ex. G77, GSM, etc.. I hope I'm on the right track.. I'll let you know if I succeed on this AEC development.. Many thanks Chris Adoremos On Thu, Sep 30, 2010 at 3:00 PM, Anton A. Shpakovsky <saa at tomsksoft.com>wrote:> Hi > > > > So in your case if you don?t want to use *speex_echo_cancellation** *than > you should do next way: > > > > Save the playback frames (clean echo) within separate playback thread with > *speex_echo_playback** *func. > > Then use speex_echo_capture - it will remove the clean echo frame (saved > with *speex_echo_playback** *func) from > > const spx_int16_t *rec buffer (saved with *speex_echo_**capture)** *and > you will get clean frame in "out" buffer. > > > > The sync is very important - because *speex_echo_**capture *won't be able > to remove clean echo frame that you didn't provide with * > speex_echo_playback**.* > > * * > > I hope I didn't messed up anything :) > > > > Best Regards, > > Anton A. Shpakovsky > > > > > > *From:* Christopher Adoremos [mailto:chrisadoremos at gmail.com] > *Sent:* Thursday, September 30, 2010 11:52 AM > *To:* Anton A. Shpakovsky > *Cc:* speex-dev at xiph.org > *Subject:* [SPAM] [BombData][alltestmode] Re: [SPAM] > [BombData][alltestmode] [Speex-dev] Using Speex Echo Canceller > > > > Hi Anton > > Thanks for the info... > > What if I use this function do I still need to sync the playback and > capture? > Assuming that the captured voice (*rec) already contains the echo which I > need to cancel out... > -------------------------------- > void speex_echo_capture (SpeexEchoState *st, const spx_int16_t *rec, > spx_int16_t *out) > > Parameters: > st Echo canceller state > rec signal from the microphone (near end + far end echo) > out Returns near-end signal with echo removed > ---------------------------------- > > thanks & regards, > Chris Adoremos > > On Wed, Sep 29, 2010 at 5:46 PM, Anton A. Shpakovsky <saa at tomsksoft.com> > wrote: > > Hi > > > > Yes, it's absolutely unnecessary to use speex codec. You can encode the > echo cancelled auido data with any codec you want. > > The Echo Canncelation API is here - > http://www.speex.org/docs/api/speex-api-reference/group__SpeexEchoState.html > > I would advice you to look at *speex_echo_cancellation *function but you > will have to sync playback and capture streams by yourself. > > > > I've used GSM, iLBC and Speex codecs with Speex AEC and it works fine. > > > > Best Regards, > > Anton A. Shpakovsky > > > > > > *From:* speex-dev-bounces at xiph.org [mailto:speex-dev-bounces at xiph.org] *On > Behalf Of *Christopher Adoremos > *Sent:* Wednesday, September 29, 2010 4:39 PM > *To:* speex-dev at xiph.org > *Cc:* jean-marc.valin at usherbrooke.ca > *Subject:* [SPAM] [BombData][alltestmode] [Speex-dev] Using Speex Echo > Canceller > > > > Hi > > > > Is it possible to use only the speex echo cancellation module w/o using the > speex codec? > > > > Here's the scenario: > > 1. I have my voice recorded in PCM audio file format > > 2. I want to cleanup the recorded voice by removing any echo included in > the audio file/buffer > > 3. can I just use the ff APIs? > > - SpeexEchoState* speex_echo_state_init() > > - int speex_echo_ctl() > > - void speex_echo_capture() > > 4. then, will it be possible to encode the output buffer from > speex_echo_capture() to any codec? > > Like G711? GSM? etc.... > > > > I'm quite new to audio format concepts/development, so if you have any > ideas your advice is highly appreciated.. > > > > Thanks in advance > > Chris A > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20100930/ad973270/attachment-0001.htm
Maybe Matching Threads
- [SPAM] [BombData][alltestmode] Using Speex Echo Canceller
- [BombData][alltestmode] Re: [SPAM] [BombData][alltestmode] Re: Speex EchoCancellation
- [SPAM] [BombData][alltestmode] Using Speex Echo Canceller
- [SPAM] [BombData][alltestmode] Re: Speex Echo Cancellation
- [SPAM] [BombData][alltestmode] Re: Speex Echo Cancellation