Kirk, Speex was designed for 8kHz, 16kHz, and 32kHz sample rates. If you don't use one of these sample rates, you'll be messing up important assumptions deep within the codec. Why these sample rates? It's telecommunications tradition, rather than PC audio tradition. If you want an efficient and high quality format for voice chat, try 16kHz with VBR quality 6. You should see around a 10:1 compression ratio when someone is talking. That is, around 25kbps would be a rough peak using these settings. If that's too much bandwidth for you, you can cut it by almost half using VBR quality 2. (The loss of quality will be noticible to most people using headsets. It is less noticible when using speakers.) For further bandwidth savings you could use 8kHz, but it's too much of a quality hit to be worth it in my opinion. Tom <khaynes@kirkgames.com> wrote:> > Hi, > > I'm attempting to use speex for voice chat in my game. > > I'm capturing audio from the mic using OpenAL 1.1 in 16 bit mono. What > sample rate is recommended for capturing from the mic? Which would be > better: 11025 samples per second, or 22050 samples per second of 16 bit > mono audio with respect to then encoding/decoding it with speex? I'm > using 11025 to reduce bandwidth at the moment to capture. > > Given your answer to the above question, what is the most efficient > frame size for encoding the samples to speex frames? The sample code > uses 160 samples (320 bytes) of 16 bit audio samples, which are then > encoded to 200 bytes of encoded data. Is a 30% reduction in data pretty > standard? How do I use speex most efficiently? > > Kirk >_______________________________________________> Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev
It seems that I only have the following values available for sampling from the mic. "The value must be 8000, 11025, 22050, 32000, 44100, or 48000" Which leaves 8000 and 32000 for use with speex. I think since this is a game and not a voice application, I'm stuck using the 8kHz rate. What speex setting would you recommend I use for the best quality/performace, what frame size (number of samples) to send to the encoder, etc..> Kirk, > > Speex was designed for 8kHz, 16kHz, and 32kHz sample rates. If you > don't use one of these sample rates, you'll be messing up important > assumptions deep within the codec. Why these sample rates? It's > telecommunications tradition, rather than PC audio tradition. > > If you want an efficient and high quality format for voice chat, try > 16kHz with VBR quality 6. You should see around a 10:1 compression > ratio when someone is talking. That is, around 25kbps would be a > rough peak using these settings. > > If that's too much bandwidth for you, you can cut it by almost half > using VBR quality 2. (The loss of quality will be noticible to most > people using headsets. It is less noticible when using speakers.) > For further bandwidth savings you could use 8kHz, but it's too much > of a quality hit to be worth it in my opinion. > > Tom
Kirk, You can always sample from the mic at a higher rate, and resample for use with speex. If you sample at 32K or 48K, you can easily resample down to 16K, and use that for wideband speex.. On Dec 11, 2006, at 6:11 PM, <khaynes@kirkgames.com> wrote:> It seems that I only have the following values available for > sampling from the mic. > > "The value must be 8000, 11025, 22050, 32000, 44100, or 48000" > > Which leaves 8000 and 32000 for use with speex. I think since this > is a game and not a voice application, I'm stuck using the 8kHz > rate. What speex setting would you recommend I use for the best > quality/performace, what frame size (number of samples) to send to > the encoder, etc.. > > >> Kirk, >> >> Speex was designed for 8kHz, 16kHz, and 32kHz sample rates. If you >> don't use one of these sample rates, you'll be messing up important >> assumptions deep within the codec. Why these sample rates? It's >> telecommunications tradition, rather than PC audio tradition. >> >> If you want an efficient and high quality format for voice chat, try >> 16kHz with VBR quality 6. You should see around a 10:1 compression >> ratio when someone is talking. That is, around 25kbps would be a >> rough peak using these settings. >> >> If that's too much bandwidth for you, you can cut it by almost half >> using VBR quality 2. (The loss of quality will be noticible to most >> people using headsets. It is less noticible when using speakers.) >> For further bandwidth savings you could use 8kHz, but it's too much >> of a quality hit to be worth it in my opinion. >> >> Tom > > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev >
I am using Speex with 16-bit mono input data at 11025 (so 176kbps in). I have it configured for ABR of ~8000 and I see compressed data take about 5% of the original size. It sounds pretty decent to me but it depends on your application. -----Original Message----- From: speex-dev-bounces@xiph.org [mailto:speex-dev-bounces@xiph.org] On Behalf Of Tom Grandgent tgrand-at-canvaslink.com |speex| Sent: Monday, December 11, 2006 4:49 PM To: Findlay, Dave Subject: Re: [Speex-dev] Sampling Rate Kirk, Speex was designed for 8kHz, 16kHz, and 32kHz sample rates. If you don't use one of these sample rates, you'll be messing up important assumptions deep within the codec. Why these sample rates? It's telecommunications tradition, rather than PC audio tradition. If you want an efficient and high quality format for voice chat, try 16kHz with VBR quality 6. You should see around a 10:1 compression ratio when someone is talking. That is, around 25kbps would be a rough peak using these settings. If that's too much bandwidth for you, you can cut it by almost half using VBR quality 2. (The loss of quality will be noticible to most people using headsets. It is less noticible when using speakers.) For further bandwidth savings you could use 8kHz, but it's too much of a quality hit to be worth it in my opinion. Tom <khaynes@kirkgames.com> wrote:> > Hi, > > I'm attempting to use speex for voice chat in my game. > > I'm capturing audio from the mic using OpenAL 1.1 in 16 bit mono. What> sample rate is recommended for capturing from the mic? Which would be > better: 11025 samples per second, or 22050 samples per second of 16 > bit mono audio with respect to then encoding/decoding it with speex? > I'm using 11025 to reduce bandwidth at the moment to capture. > > Given your answer to the above question, what is the most efficient > frame size for encoding the samples to speex frames? The sample code > uses 160 samples (320 bytes) of 16 bit audio samples, which are then > encoded to 200 bytes of encoded data. Is a 30% reduction in data > pretty standard? How do I use speex most efficiently? > > Kirk >_______________________________________________> Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev_______________________________________________ Speex-dev mailing list Speex-dev@xiph.org http://lists.xiph.org/mailman/listinfo/speex-dev
I'd like to thank Tom Grandgent for taking the time to find the read and write position updating bugs in my encode and decode code.
What would be speex configuration recomended for Telefone/Voip quality voice? With a quality just a little better/similar then G.729? or GSM? is there a comparison chart somewhere, but telephone quality oriented? Thanks, Alain Tom Grandgent escreveu:> Kirk, > > Speex was designed for 8kHz, 16kHz, and 32kHz sample rates. If you > don't use one of these sample rates, you'll be messing up important > assumptions deep within the codec. Why these sample rates? It's > telecommunications tradition, rather than PC audio tradition. > > If you want an efficient and high quality format for voice chat, try > 16kHz with VBR quality 6. You should see around a 10:1 compression > ratio when someone is talking. That is, around 25kbps would be a > rough peak using these settings. > > If that's too much bandwidth for you, you can cut it by almost half > using VBR quality 2. (The loss of quality will be noticible to most > people using headsets. It is less noticible when using speakers.) > For further bandwidth savings you could use 8kHz, but it's too much > of a quality hit to be worth it in my opinion. > > Tom > > <khaynes@kirkgames.com> wrote: >> Hi, >> >> I'm attempting to use speex for voice chat in my game. >> >> I'm capturing audio from the mic using OpenAL 1.1 in 16 bit mono. What >> sample rate is recommended for capturing from the mic? Which would be >> better: 11025 samples per second, or 22050 samples per second of 16 bit >> mono audio with respect to then encoding/decoding it with speex? I'm >> using 11025 to reduce bandwidth at the moment to capture. >> >> Given your answer to the above question, what is the most efficient >> frame size for encoding the samples to speex frames? The sample code >> uses 160 samples (320 bytes) of 16 bit audio samples, which are then >> encoded to 200 bytes of encoded data. Is a 30% reduction in data pretty >> standard? How do I use speex most efficiently? >> >> Kirk >> > _______________________________________________ >> Speex-dev mailing list >> Speex-dev@xiph.org >> http://lists.xiph.org/mailman/listinfo/speex-dev > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev > >
Alain M. a ?crit :> What would be speex configuration recomended for Telefone/Voip quality > voice? With a quality just a little better/similar then G.729? or GSM?I generally recommend wideband if possible. Otherwise, I recommend 15 kbps, which is much better than G.729 or GSM. The reason for that is that you're already pushing 16 kbps of (RTP+UDP+IP) headers around, so it's a bit silly to try and compress the audio down to 8 kbps (unless you have to because 15 kbps won't fit).> is there a comparison chart somewhere, but telephone quality oriented?A while ago, I ran PESQ on Speex and other codecs. The results for NB and WB are at http://people.xiph.org/~jm/aes_nb.png and http://people.xiph.org/~jm/aes_wb.png but SHOULD BE TAKEN WITH A GRAIN OF SALT because PESQ is particularly unreliable for comparing codecs. Jean-Marc> Thanks, > Alain > > Tom Grandgent escreveu: >> Kirk, >> >> Speex was designed for 8kHz, 16kHz, and 32kHz sample rates. If you >> don't use one of these sample rates, you'll be messing up important >> assumptions deep within the codec. Why these sample rates? It's >> telecommunications tradition, rather than PC audio tradition. >> >> If you want an efficient and high quality format for voice chat, try >> 16kHz with VBR quality 6. You should see around a 10:1 compression >> ratio when someone is talking. That is, around 25kbps would be a >> rough peak using these settings. >> >> If that's too much bandwidth for you, you can cut it by almost half >> using VBR quality 2. (The loss of quality will be noticible to most >> people using headsets. It is less noticible when using speakers.) >> For further bandwidth savings you could use 8kHz, but it's too much of >> a quality hit to be worth it in my opinion. >> >> Tom >> >> <khaynes@kirkgames.com> wrote: >>> Hi, >>> >>> I'm attempting to use speex for voice chat in my game. >>> >>> I'm capturing audio from the mic using OpenAL 1.1 in 16 bit mono. >>> What sample rate is recommended for capturing from the mic? Which >>> would be better: 11025 samples per second, or 22050 samples per >>> second of 16 bit mono audio with respect to then encoding/decoding it >>> with speex? I'm using 11025 to reduce bandwidth at the moment to >>> capture. >>> >>> Given your answer to the above question, what is the most efficient >>> frame size for encoding the samples to speex frames? The sample code >>> uses 160 samples (320 bytes) of 16 bit audio samples, which are then >>> encoded to 200 bytes of encoded data. Is a 30% reduction in data >>> pretty standard? How do I use speex most efficiently? >>> >>> Kirk >>> >> _______________________________________________ >>> Speex-dev mailing list >>> Speex-dev@xiph.org >>> http://lists.xiph.org/mailman/listinfo/speex-dev >> >> _______________________________________________ >> Speex-dev mailing list >> Speex-dev@xiph.org >> http://lists.xiph.org/mailman/listinfo/speex-dev >> >> > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev > >