Dear all, First, my aim is to achieve VoIP using VBR and DTX under Win32. I face a problem using speex 1.0.4 and need some help. My voice is ok and no background noise when I do NOT normalize 16 bit value to floating value. Normalized means dividing the 16 bit value by 32767. Turning on VBR is also ok but DTX has no effect. However, the speak is has a continous background beep sound AFTER I normalized my 16 bit value to floating value. Also, voice is a little bit cracked when I speak but I still can hear what I say. No Codec option has been set. After normalized, I turn on VBR, the speak become very noisy immediately. Anyone has any idea? Also, DTX is still not working. I have gone through the manual but not much info on this area. The following is my setting from sound card using mm_system sdk. WAVEFORMATEX *wfx = (WAVEFORMATEX *)input; wfx->nSamplesPerSec = 8000; wfx->nChannels = 1; wfx->wFormatTag = WAVE_FORMAT_PCM; wfx->wBitsPerSample = 16; wfx->nBlockAlign = 2; wfx->nAvgBytesPerSec = 16000; Thanks in advance, YueWeng __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo
On Tue, 28 Dec 2004 19:49:34 -0800 (PST) Tay YueWeng <yueweng@yahoo.com> wrote:> > Dear all, > > First, my aim is to achieve VoIP using VBR and DTX > under Win32. > I face a problem using speex 1.0.4 and need some help. > > My voice is ok and no background noise when I do NOT > normalize 16 bit value to floating value. Normalized > means dividing the 16 bit value by 32767.16 bit ints have a range of -32768 to 32767. If you divide -32768 by 32767.0 you end up with -1.00003051850948 which is a bad thing. Try normalizing with a value of 32768.0. Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid) +-----------------------------------------------------------+ "OS X is great that way. I put a copy of OS X on my coffee table, and it hasn't been hacked yet. Yes, I am using it as a server. I serve several meals on it every week." -- Anthony Minkoff
> 16 bit ints have a range of -32768 to 32767. If you divide > -32768 by 32767.0 you end up with -1.00003051850948 which > is a bad thing. > > Try normalizing with a value of 32768.0.No. Speex expects values in the +-32767 range, not +-1.0. Just converting from int16 to float *is* the right thing to do. Jean-Marc -- Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca> Universit? de Sherbrooke