[speex-dev] question on usage of the libraries

Jean-Marc Valin jean-marc.valin at hermes.usherb.ca
Fri Dec 13 11:28:06 PST 2002

> I'm not sure if I should post this question to this list. If not; please
> tell me.
> Ok, here it comes:
> Is the following code correct for compressing audio? The output I get is so
> extremely small, but what is more important: if I pass it through zlib, it
> gets at least 50% smaller!

On regular data, gzip might get a 5% reduction, so I doubt you can get
50% unless you're encoding zeros or doing something wrong...

>         if (sample_rate > 22050)
>                 libspeex_enc_state = speex_encoder_init(&speex_wb_mode);
>         else
>                 libspeex_enc_state = speex_encoder_init(&speex_nb_mode);

In normal operation, narrowband is 8000 Hz, wideband is 16000 Hz and
ultra-wideband is 32000 Hz, so I'd change the 22050 for something like
12000 (and maybe have above 22050 encoded in ultra-wideband if


Jean-Marc Valin, M.Sc.A.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 242 bytes
Desc: signature.asc
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20021213/e4943549/signature.pgp

More information about the Speex-dev mailing list