[Speex-dev] Thanks, cloning support, JNI, and new project using Speex

Nicolas Brodu nicolas.brodu at numerimoire.net
Mon Nov 9 08:43:00 PST 2009


Hi Speex devs!

This is firt a warm thanks for your efforts and for making Speex a reality. 
Well done!

I developped a teleconference application, using Speex as the codec for the 
audio layer. The project is http://www.encours.org.

In the course of this project I had the following use case:
- Participants connect to the conference. Each participant sends a Speex 
encoded stream.
- A common audio mix of the conference is performed.
- The common mix is sent back to inactive participants only: these have no 
echo of their own voice to cancel. There is thus one unique encoder for the 
common mix.
- For each active participant I subtract its own voice from the common mix 
before sending it back with a dedicated encoder.
- I CLONE the common mix encoder when a participant becomes active, so as to 
benefit from its current state: the now-active participant and the common mix 
encoder have the same past frames, but starting from the current (active) 
frame they differ.
- I discard cloned encoders when the participant becomes silent again. There 
are at most a few participants speaking at the same time, so this way I save 
a lot of CPU.

I thus implemented cloning of the encoder state, both in the Java version of 
Speex, and in a JNI interface I wrote (because Encours.org is able to use the 
latest speex sources as JNI and fall back to pure java if the JNI is not 
found for some reason).

In case this is useful to anyone, do not hesitate to take the cloning code 
back from Encours.org :)

Happy hacking,
Nicolas


More information about the Speex-dev mailing list