[Speex-dev] Speex Codec Delay Problem

Thilo Köhler koehlerthilo at gmx.de
Tue Apr 10 13:07:20 PDT 2012


Hello All!

SPEEX introduces an additional delay to the audio data,
I found out by reverse enginiering (it is NOT the lookahead time):

narrow band : delay = 200 - framesize + lookahead = 200 - 160 +  40 =  80
samples 
wide band   : delay = 400 - framesize + lookahead = 400 - 320 + 143 = 223
samples
uwide band  : delay = 800 - framesize + lookahead = 800 - 640 + 349 = 509
samples

To get the timing right, you must skip those samples before you get the
actual audio
data you have feeded into the codec.
Or, better, feed the encoder with (framesize - delay) dummy samples first,
throw away
the entire first frame, and continue encoding. This avoids that the first
data you feed in must 
share its bits with the preceeding zeros, and you get a more compact
encoding.
(this might matter if you have a lot of short samples).

This all sounds like a bad hack, and actually it is. What do the auhtor(s)
of SPEEX think,
can this be considered as a bug and be fixed?

I ran into this problem and it took me a while to work around it, and I can
observe
on the internet that other people have problems with this too.
If you encode 1000 samples, and then decode 1000 samples, you expect
to get the same 1000 samples back.
 (or, if the codec is lossy, an approximation)

Regards,

Thilo


On 10.04.2012, you wrote:
> Send Speex-dev mailing list submissions to
>   speex-dev at xiph.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>   http://lists.xiph.org/mailman/listinfo/speex-dev
> or, via email, send a message with subject or body 'help' to
>   speex-dev-request at xiph.org
>
> You can reach the person managing the list at
>   speex-dev-owner at xiph.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Speex-dev digest..."
>
>
> Today's Topics:
>
>    1. (no subject) (Bush Josh)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 10 Apr 2012 05:59:42 +0100
> From: Bush Josh <darthbush at hotmail.com>
> Subject: [Speex-dev] (no subject)
> To: <a2xde4 at msn.com>, <pink.caro at hotmail.com>, <avahod at hotmail.co.uk>,
>   <alexinanutshell at hotmail.co.uk>, <speex-dev at xiph.org>,
>   <finchn.n1c0ll3 at hotmail.co.uk>, <haleigh-x-x-x at hotmail.co.uk>,
>   <dujimache at hotmail.com>, <james_e397 at hotmail.com>
> Message-ID: <DUB113-W36807C4B7517AB0B77B5A1A8340 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> 
>
http://www.bbqol-tr.com/wp-content/themes/timecrunch/rytj.html?mg=ghy.jng&amf=fh.msg&gsyj=uylp
>                      -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
http://lists.xiph.org/pipermail/speex-dev/attachments/20120410/c73280ab/attachment-0001.htm
>  
> ------------------------------
>
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
>
>
> End of Speex-dev Digest, Vol 95, Issue 4
> ****************************************
> 

Regards,

Thilo Koehler
-- 




More information about the Speex-dev mailing list