[Speex-dev] how to implement PLC?

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Mon Feb 6 20:42:18 PST 2006

Not sure I understand your question right... but here's how you do PLC
with Speex.

When you receive a packet, you do a
speex_decode(decoder, bits, audio);

Now, if you didn't receive anything and want to play some audio, all you
need to do is:
speex_decode(decoder, NULL, audio);

and you will have extrapolated data in "audio" while telling the decoder
to update its state to account for the fact that a packet was dropped.


On Tue, 2006-02-07 at 12:33 +0800, Ronaldo Madrid wrote:
> hi,
> i'd like to ask for a suggestion for implementing PLC (packet lost
> concealment).
> right now, i don't have PLC applied in my application. when voice data
> arrive from the network, i just play it right away.
> does having PLC require that you play something every interval? like
> if im expecting a voice packet say every 20ms, then i play something
> at that rate. either the packet that came off the network, or that if
> there is none i just pass NULL to the speex decoder and play that one
> instead.
> a simple algorithm wold be very appreciated here. thanks a lot.
> best, 
> ronald
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev

More information about the Speex-dev mailing list