[Speex-dev] discontinous transmision causes discontinous sound

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Wed Apr 19 20:37:32 PDT 2006


On Wed, 2006-04-19 at 11:33 +0200, Jesús Morión wrote:
> Hi, im working on a voIP application. In order to reduce the traffic, 
> decided not to send "silence" blocks.
> 
> Firstly i used an algorithm based on the volume to determine what is 
> silence, and now im using the return value of the preprocessor to 
> determine that.

Have you tried the builting DTX (SPEEX_ENABLE_VAD and SPEEX_ENABLE_DTX)?
It can also generate comfort noise at the other end.
 
> In both cases, after any not sent block, the next block of sound i send 
> starts ok, then makes a little "pause" and then continues perfectly.

Not sure what you mean exactly, but it sounds a bit strange...

> I think it is due to a loss context in the decoder (because in the 
> encoder i process every frame).

Yes, the decoder becomes out of sync with the encoder, breaking the
pitch prediction in the same was as when there is packet loss (in this
case, it's really heavy loss).

> I have tried to reset the decoder, decode with NULL bits or recreate the 
> decoder, before decode the "sound" block, and no one of these solutions 
> solved the problem or minimized it.

What you need is to reset the encoder as well, so that the encoder and
decoder are in sync. But even then, you might get better results with
the builting DTX (except that the VAD is uses is not as good as the one
in the preprocessor).

	Jean-Marc


More information about the Speex-dev mailing list