I've been playing with speex for use in a VoIP application between PC's. One thing I've found (correlating to the documentation) it that speex runs much faster and produced much better output when it's fed a 32kHz signal instead of a 44.1kHz sample rate. This is whether I tell it a 44.1kHz sample rate and feed it 44.1kHz or tell it 32kHz and feed it 44.1kHz. What part of the algorithm is optimized for 32kHz (my initial guess was the codebooks and/or the codebook search) - would it be possible to modify it to take a 44.1kHz signal? I'm interested in avoiding the sample-rate conversion on record and playback since it costs me latency and CPU time. John --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Le ven 10/01/2003 à 14:39, John Hayes a écrit :> I've been playing with speex for use in a VoIP application between PC's. One > thing I've found (correlating to the documentation) it that speex runs much > faster and produced much better output when it's fed a 32kHz signal instead > of a 44.1kHz sample rate. This is whether I tell it a 44.1kHz sample rate > and feed it 44.1kHz or tell it 32kHz and feed it 44.1kHz.First, note that the sampling rate you *tell* it is only used for playing back at the right speed and doesn't influence the algorithm (yet). Speex treats 32 kHz the same way as 44.1 kHz so the speed factor is just 44.1/32> What part of the algorithm is optimized for 32kHz (my initial guess was the > codebooks and/or the codebook search) - would it be possible to modify it to > take a 44.1kHz signal?It's still not clear yet to me, but it's probably a combination of the number of LSP's (LPC order) used and the tuning of the "perceptual weighting filter" (analogous to psycho-acoustic models in other audio codecs). In the first case it's not possible to change it without changing the bit-stream, but in the second case, it would be possible to do something about it.> I'm interested in avoiding the sample-rate conversion on record and playback > since it costs me latency and CPU time.The cost of down-sampling, if done efficiently, is probably less then the cost difference between 32 kHz and 44.1 kHz so it's probably worth it. If you don't care about standard sampling rate, you could even to a 2/3 conversion which would get you 29.4 kHz... Jean-Marc -- Jean-Marc Valin, M.Sc.A. LABORIUS (http://www.gel.usherb.ca/laborius) Université de Sherbrooke, Québec, Canada <p> -------------- 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/20030110/10fee900/signature.pgp
You raise an excellent point that I missed, it's certainly faster to do the sample -rate conversion than encode and decode the additional data. I will purse that, thanks. John> -----Original Message----- > From: Jean-Marc Valin [mailto:jean-marc.valin@hermes.usherb.ca] > Sent: Friday, January 10, 2003 11:50 AM > To: speex > Cc: John Hayes > Subject: Re: [speex-dev] Optimizing speex for 44.1kHz> The cost of down-sampling, if done efficiently, is probably less then > the cost difference between 32 kHz and 44.1 kHz so it's probably worth > it. If you don't care about standard sampling rate, you could even to a > 2/3 conversion which would get you 29.4 kHz...--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
> The cost of down-sampling, if done efficiently, is probably less then > the cost difference between 32 kHz and 44.1 kHz so it's probably worth > it. If you don't care about standard sampling rate, you could even to a > 2/3 conversion which would get you 29.4 kHz...I'm curious why not just sample at a lower rate if it's just VoIP anyway? My opinion is that 44kHz sampling for voice is excessive... unless you really do want to do CD quality. Greg --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.