Bjoern Rasmussen
2004-Aug-06 15:01 UTC
[speex-dev] Memory leak in denoiser + a few questions
Hello The st->zeta pointer isn't freed in the speex_preprocess_state_destroy() function of the preprocess.c file (alloced in line 167). It's in Speex 1.1.4 by the way. I'm trying to make the denoiser work with my application and has got reasonable noise reduction after applying the denoiser. I, however, haven't been able to find any information of what the purpose of SPEEX_PREPROCESS_SET_AGC and SPEEX_PREPROCESS_SET_AGC_LEVEL is? Kind regards Bjoern D. Rasmussen www.bearware.dk _________________________________________________________________ Få alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk --- >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.
On Mar 28, 2004, at 8:23 PM, Jean-Marc Valin wrote:>> The st->zeta pointer isn't freed in the >> speex_preprocess_state_destroy() >> function of the preprocess.c file (alloced in line 167). It's in >> Speex 1.1.4 >> by the way. > > Oops... Thanks for letting me know. I'll change that for the next > release (in the mean time, the fix is obvious). In case you're > interested, I'm currently working on a reverberation suppression > algorithm. I'll put it in CVS.Reverberation suppression? I guess this would help reduce local source echoes? I've never _noticed_ that to be a problem in my use, but I would imagine that using a notebook's built-in microphone, you'd get some echo off of the screen and stuff [also from the whole room].. Most of these echoes aren't so bad, but I guess they might make the encoding job harder. I'd sure rather see the echo cancellation finished [not that I have any say on what you work on!!!]. FWIW, I'm currently using noise reduction, VAD, and AGC in a VoIP client which is getting more use out there, and it's working well. I'm currently using VAD in a conferencing application [where the VAD decision helps me avoid adding noise to the common conference, and ostensibly avoid redundant mixing steps]. The problem here is that VAD is very expensive. I did a little set of tests, and VAD is currently my bottleneck for users who are using it.. Here's the numbers I got doing vad on 655 seconds of audio (about half is speech, half is absolute silence [0's]). P3-600: 25 seconds Athlon XP 1700+ (1.45Ghz): 5 seconds P4 2.8Ghz: 8.8 seconds. I was surprised to see the Athlon win this by such a wide margin, but I triple-checked to make sure the machine was idle, and the binaries and test data were exactly the same (compiled with just -O2). Anyway, I think I might need to find a less computationally intensive VAD solution for the conference. VAD is currently only used when people connect via the PSTN, so they presumably have a decent SNR, and I may be able to get away with an energy envelope type of thing, without needing frequency domain analysis. But before I go and start coding this, is there any simple optimizations that can be done to the preprocessor when it is being used only for the VAD decision? <p><p><p><p>--- >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.
Bjoern, And to actually answer the question, SPEEX_PREPROCESS_SET_AGC turns adaptive gain control on/off and SPEEX_PREPROCESS_SET_AGC_LEVEL sets the gain level that the signal is adapted to. Tom At 11:01 AM 3/28/2004, Tom Harper wrote:>Bjoern, > >As far as I understand it, AGC keeps the volume level of the speech >elements (i.e. gain) stable no matter how quiet or loud the input becomes- > >Tom > >At 10:53 AM 3/28/2004, Bjoern Rasmussen wrote: >>Hello >> >>The st->zeta pointer isn't freed in the speex_preprocess_state_destroy() >>function of the preprocess.c file (alloced in line 167). It's in Speex >>1.1.4 by the way. >> >>I'm trying to make the denoiser work with my application and has got >>reasonable noise reduction after applying the denoiser. I, however, >>haven't been able to find any information of what the purpose of >>SPEEX_PREPROCESS_SET_AGC and SPEEX_PREPROCESS_SET_AGC_LEVEL is? >> >>Kind regards >> >>Bjoern D. Rasmussen >>www.bearware.dk >> >>_________________________________________________________________ >>Få alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk >> >>--- >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. > >-- > >Tom Harper - tharper@sightspeed.com >Lead Software Engineer >SightSpeed - A Roda Group Affiliated Company > >918 Parker St, Suite A14 >Berkeley, CA 94710 > >Phone: 510.665.2920 >Cell: 415.378.3779 > >http://www.sightspeed.com > > >--- >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.-- Tom Harper - tharper@sightspeed.com Lead Software Engineer SightSpeed - A Roda Group Affiliated Company 918 Parker St, Suite A14 Berkeley, CA 94710 Phone: 510.665.2920 Cell: 415.378.3779 http://www.sightspeed.com <p>--- >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.
Chris Flerackers
2004-Aug-06 15:02 UTC
[speex-dev] SPEEX_GET_SAMPLING_RATE of encoder is wrong
Hi, I'm using speex 1.1.4 and when I query SPEEX_GET_SAMPLING_RATE as in speex_encoder_ctl ( m_pEncoderState, SPEEX_GET_SAMPLING_RATE, &m_SampleRate ); I get 2 The encoder is initialized with m_pEncoderState = speex_encoder_init ( &speex_wb_mode ); On the decoder side, the correct sampling rate is returned: m_pDecoderState = speex_decoder_init ( &speex_wb_mode ); speex_decoder_ctl ( m_pDecoderState, SPEEX_GET_SAMPLING_RATE, &m_SampleRate ); I debugged the encoder and the stack trace is as follows: -> speex_encoder_ctl ( m_pEncoderState, SPEEX_GET_SAMPLING_RATE, &m_SampleRate ); -> int speex_encoder_ctl(void *state, int request, void *ptr) return (*((SpeexMode**)state))->enc_ctl(state, request, ptr); -> int sb_encoder_ctl(void *state, int request, void *ptr) ... case SPEEX_GET_SAMPLING_RATE: (*(int*)ptr)=st->sampling_rate; break; ... And st->sampling_rate is 2. I debugged some further and it seems: sb_encoder_init calls speex_decoder_ctl(st->st_low, SPEEX_GET_SAMPLING_RATE, &st->sampling_rate); to get the sampling rate. I think it should be speex_encoder_ctl (otherwise SBEncState * is interpreted as SBDecState *). Best regards, Chris --- >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.
Bjoern, As far as I understand it, AGC keeps the volume level of the speech elements (i.e. gain) stable no matter how quiet or loud the input becomes- Tom At 10:53 AM 3/28/2004, Bjoern Rasmussen wrote:>Hello > >The st->zeta pointer isn't freed in the speex_preprocess_state_destroy() >function of the preprocess.c file (alloced in line 167). It's in Speex >1.1.4 by the way. > >I'm trying to make the denoiser work with my application and has got >reasonable noise reduction after applying the denoiser. I, however, >haven't been able to find any information of what the purpose of >SPEEX_PREPROCESS_SET_AGC and SPEEX_PREPROCESS_SET_AGC_LEVEL is? > >Kind regards > >Bjoern D. Rasmussen >www.bearware.dk > >_________________________________________________________________ >Få alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk > >--- >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.-- Tom Harper - tharper@sightspeed.com Lead Software Engineer SightSpeed - A Roda Group Affiliated Company 918 Parker St, Suite A14 Berkeley, CA 94710 Phone: 510.665.2920 Cell: 415.378.3779 http://www.sightspeed.com <p>--- >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.
Jean-Marc Valin
2004-Aug-06 15:02 UTC
[speex-dev] Memory leak in denoiser + a few questions
> The st->zeta pointer isn't freed in the speex_preprocess_state_destroy() > function of the preprocess.c file (alloced in line 167). It's in Speex 1.1.4 > by the way.Oops... Thanks for letting me know. I'll change that for the next release (in the mean time, the fix is obvious). In case you're interested, I'm currently working on a reverberation suppression algorithm. I'll put it in CVS soon. Jean-Marc -- Jean-Marc Valin http://www.xiph.org/~jm/ LABORIUS Université de Sherbrooke, Québec, Canada -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: Ceci est une partie de message numériquement signée. Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040328/ffcc5603/signature-0001.pgp