[Speex-dev] Lost packets during transmission
Peter Kirk
pwk.linuxfan at gmx.de
Wed Nov 26 03:49:27 PST 2008
On Wednesday 26 November 2008 10:02:49 Uri Rattner wrote:
> 1. Does Speex has any mechanism to handle lost packets (like AMR
> has for example)?
Quoting the docs:
Again, once the decoder initialization is done, for every input frame:
speex_bits_read_from(&bits, input_bytes, nbBytes);
speex_decode_int(dec_state, &bits, output_frame);
where input_bytes is a (char *) containing the bit-stream data received for a
frame, nbBytes is the size (in bytes) of that bit-stream, and output_frame is
a (short *) and points to the area where the decoded speech frame will be
written. A NULL value as the second argument indicates that we don't have the
bits for the current frame. When a frame is lost, the Speex decoder will do
its best to "guess" the correct signal.
> 2. I am using Speex in a constant frame size (160 bytes),
> narrowband, VBR off, SPEEX_SET_QUALITY = 3 and SPEEX_SET_COMPLEXITY
> =1 .
>
> I encode speech stream and sending the encoded packets to the their
> destination.
>
> If I am loosing 4 continuous frames during the transmission , what can
> I expect to hear? noise ? quiet ? echo ?
interpolation, i.e. the decoder trying hard to fill the gap with "similar"
sound to what was occurring previously.
Peter
More information about the Speex-dev
mailing list