AEC plugin in Gstreamer

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

AEC plugin in Gstreamer

rmkart
Hi,
Is there any AEC (Achoustic echo cancellation) Gstreamer plugin available.
For this I need to get the input from alsasink and send it to Alsasrc, the Alsa component does a buffering within itsself. If I try to apply AEC on these buffers then the quality wont be good as the logic is pplies on buffers which might not be in syc. Can anyone siggest me any ideas/suggestion for this.
Thanks,
RK
Reply | Threaded
Open this post in threaded view
|

Re: AEC plugin in Gstreamer

Stefan Sauer
rmkart schrieb:
> Hi,
> Is there any AEC (Achoustic echo cancellation) Gstreamer plugin available.
> For this I need to get the input from alsasink and send it to Alsasrc, the
> Alsa component does a buffering within itsself. If I try to apply AEC on
> these buffers then the quality wont be good as the logic is pplies on
> buffers which might not be in syc. Can anyone siggest me any
> ideas/suggestion for this.
> Thanks,
> RK

There is none I am aware of. If you consider start making one, keep us up-to-date.

Stefan

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AEC plugin in Gstreamer

Olivier Crête-2
On Sun, 2009-08-30 at 21:16 +0300, Stefan Kost wrote:

> rmkart schrieb:
> > Hi,
> > Is there any AEC (Achoustic echo cancellation) Gstreamer plugin available.
> > For this I need to get the input from alsasink and send it to Alsasrc, the
> > Alsa component does a buffering within itsself. If I try to apply AEC on
> > these buffers then the quality wont be good as the logic is pplies on
> > buffers which might not be in syc. Can anyone siggest me any
> > ideas/suggestion for this.
> > Thanks,
> > RK
>
> There is none I am aware of. If you consider start making one, keep us up-to-date.
I started writing one based on libspeexdsp, but I never got it to work
properly. The code is at:

http://git.collabora.co.uk/?p=user/tester/gst-plugins-farsight-tester.git;a=tree;f=ext/speexdsp;hb=speexdsp

Also, my understanding is that the AEC algorithm in speexdsp will only
work if the src and the sink are on the same sound card. So it won't
work with stuff like USB or Bluetooth speakers or with the microphone on
a Webcam. So I kind of gave up on it.

--
Olivier Crête
[hidden email]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: AEC plugin in Gstreamer

Viraj Karandikar
Hi,
We are developing AEC plugin for our proprietary AEC implementation.
We are having 2 sink pads (one for near end and one for far end inputs) and 1 source pad (for AEC output).
Audio capture and playback can happen with any of the available plugins.
But you have to implement a logic to make sure that the input data to AEC algo is in correct sync.
Also is it required to have as minimum delay as possible in capture and playback path to have short tail length.
 
Regards,
Viraj

2009/8/30 Olivier Crête <[hidden email]>
On Sun, 2009-08-30 at 21:16 +0300, Stefan Kost wrote:
> rmkart schrieb:
> > Hi,
> > Is there any AEC (Achoustic echo cancellation) Gstreamer plugin available.
> > For this I need to get the input from alsasink and send it to Alsasrc, the
> > Alsa component does a buffering within itsself. If I try to apply AEC on
> > these buffers then the quality wont be good as the logic is pplies on
> > buffers which might not be in syc. Can anyone siggest me any
> > ideas/suggestion for this.
> > Thanks,
> > RK
>
> There is none I am aware of. If you consider start making one, keep us up-to-date.

I started writing one based on libspeexdsp, but I never got it to work
properly. The code is at:

http://git.collabora.co.uk/?p=user/tester/gst-plugins-farsight-tester.git;a=tree;f=ext/speexdsp;hb=speexdsp

Also, my understanding is that the AEC algorithm in speexdsp will only
work if the src and the sink are on the same sound card. So it won't
work with stuff like USB or Bluetooth speakers or with the microphone on
a Webcam. So I kind of gave up on it.

--
Olivier Crête
[hidden email]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
- Viraj
Reality is merely an illusion, albeit a very persistent one.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AEC plugin in Gstreamer

Olivier Crête-2
On Wed, 2009-09-09 at 23:03 +0530, Viraj Karandikar wrote:

> Hi,
> We are developing AEC plugin for our proprietary AEC implementation.
> We are having 2 sink pads (one for near end and one for far end
> inputs) and 1 source pad (for AEC output).
> Audio capture and playback can happen with any of the available
> plugins.
> But you have to implement a logic to make sure that the input data to
> AEC algo is in correct sync.
> Also is it required to have as minimum delay as possible in capture
> and playback path to have short tail length.
Yes, thats exactly what I was trying to do with the speexdsp based one.
But for some reason it never worked properly. So either I'm almost there
and there is only some tiny bugs.. Or I'm entirely on the wrong path..
Either way, you have to work it out..

Olivier


> 2009/8/30 Olivier Crête <[hidden email]>
>         On Sun, 2009-08-30 at 21:16 +0300, Stefan Kost wrote:
>         > rmkart schrieb:
>         > > Hi,
>         > > Is there any AEC (Achoustic echo cancellation) Gstreamer
>         plugin available.
>         > > For this I need to get the input from alsasink and send it
>         to Alsasrc, the
>         > > Alsa component does a buffering within itsself. If I try
>         to apply AEC on
>         > > these buffers then the quality wont be good as the logic
>         is pplies on
>         > > buffers which might not be in syc. Can anyone siggest me
>         any
>         > > ideas/suggestion for this.
>         > > Thanks,
>         > > RK
>         >
>         > There is none I am aware of. If you consider start making
>         one, keep us up-to-date.
>        
>        
>         I started writing one based on libspeexdsp, but I never got it
>         to work
>         properly. The code is at:
>        
>         http://git.collabora.co.uk/?p=user/tester/gst-plugins-farsight-tester.git;a=tree;f=ext/speexdsp;hb=speexdsp
>        
>         Also, my understanding is that the AEC algorithm in speexdsp
>         will only
>         work if the src and the sink are on the same sound card. So it
>         won't
>         work with stuff like USB or Bluetooth speakers or with the
>         microphone on
>         a Webcam. So I kind of gave up on it.
>        
>         --
>         Olivier Crête
>         [hidden email]..uk
>        
>         ------------------------------------------------------------------------------
>         Let Crystal Reports handle the reporting - Free Crystal
>         Reports 2008 30-Day
>         trial. Simplify your report design, integration and deployment
>         - and focus on
>         what you do best, core application coding. Discover what's new
>         with
>         Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>         _______________________________________________
>         gstreamer-devel mailing list
>         [hidden email]
>         https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>        
>
>
>
> --
> - Viraj
> Reality is merely an illusion, albeit a very persistent one.
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
--
Olivier Crête
[hidden email]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: AEC plugin in Gstreamer

Håvard Graff
Some tips:
1. Don't try to use existing audio src and sinks. You are dependant on being able to capture and playout in one operation (read: thread), not two independent ones.
2. Depending on the sensitivity of your algorithm, there will often be different clocks (read: crystals) on your capture and playout devices. Even though it says it gives you 48000 samples per second, it is usually lying... Better accuracy = better AEC.
3. Try to estimate the round-trip of your sound from sink to src as close as you can get, and feed this info to the AEC.

Good luck! Let us know if you get somewhere.

Håvard


-----Original Message-----
From: Olivier Crête [mailto:[hidden email]]
Sent: 9. september 2009 19:45
To: [hidden email]
Subject: Re: [gst-devel] AEC plugin in Gstreamer

On Wed, 2009-09-09 at 23:03 +0530, Viraj Karandikar wrote:

> Hi,
> We are developing AEC plugin for our proprietary AEC implementation.
> We are having 2 sink pads (one for near end and one for far end
> inputs) and 1 source pad (for AEC output).
> Audio capture and playback can happen with any of the available
> plugins.
> But you have to implement a logic to make sure that the input data to
> AEC algo is in correct sync.
> Also is it required to have as minimum delay as possible in capture
> and playback path to have short tail length.

Yes, thats exactly what I was trying to do with the speexdsp based one.
But for some reason it never worked properly. So either I'm almost there
and there is only some tiny bugs.. Or I'm entirely on the wrong path..
Either way, you have to work it out..

Olivier


> 2009/8/30 Olivier Crête <[hidden email]>
>         On Sun, 2009-08-30 at 21:16 +0300, Stefan Kost wrote:
>         > rmkart schrieb:
>         > > Hi,
>         > > Is there any AEC (Achoustic echo cancellation) Gstreamer
>         plugin available.
>         > > For this I need to get the input from alsasink and send it
>         to Alsasrc, the
>         > > Alsa component does a buffering within itsself. If I try
>         to apply AEC on
>         > > these buffers then the quality wont be good as the logic
>         is pplies on
>         > > buffers which might not be in syc. Can anyone siggest me
>         any
>         > > ideas/suggestion for this.
>         > > Thanks,
>         > > RK
>         >
>         > There is none I am aware of. If you consider start making
>         one, keep us up-to-date.
>        
>        
>         I started writing one based on libspeexdsp, but I never got it
>         to work
>         properly. The code is at:
>        
>         http://git.collabora.co.uk/?p=user/tester/gst-plugins-farsight-tester.git;a=tree;f=ext/speexdsp;hb=speexdsp
>        
>         Also, my understanding is that the AEC algorithm in speexdsp
>         will only
>         work if the src and the sink are on the same sound card. So it
>         won't
>         work with stuff like USB or Bluetooth speakers or with the
>         microphone on
>         a Webcam. So I kind of gave up on it.
>        
>         --
>         Olivier Crête
>         [hidden email]..uk
>        
>         ------------------------------------------------------------------------------
>         Let Crystal Reports handle the reporting - Free Crystal
>         Reports 2008 30-Day
>         trial. Simplify your report design, integration and deployment
>         - and focus on
>         what you do best, core application coding. Discover what's new
>         with
>         Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>         _______________________________________________
>         gstreamer-devel mailing list
>         [hidden email]
>         https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>        
>
>
>
> --
> - Viraj
> Reality is merely an illusion, albeit a very persistent one.
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
--
Olivier Crête
[hidden email]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel