<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; ">Hi</span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; "> </span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; ">I am trying to use the Denoise option of speex but unable to do so successfully. I would really appreciate if some one could help me and identify what exactly wrong i am doing...</span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; "> </span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; ">I am using below code to perform denoise.</span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 1in; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; ">//Initialize speex preprocess state and set the denoise option</span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; text-indent: 0.5in; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; ">int nEnable = 1;</span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; "> SpxPreprocessState = speex_preprocess_state_init(160, 8000); //20ms audio at 8000 bps</span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; text-indent: 0.5in; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; ">speex_preprocess_ctl(SpxPreprocessState, SPEEX_PREPROCESS_SET_DENOISE, &nEnable);</span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; text-indent: 0.5in; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; "> </span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; text-indent: 0.5in; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; ">//Run the preprocess on the buffer captured before encoding</span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; text-indent: 0.5in; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; ">speex_preprocess_run(SpxPreprocessState, (short*)pbBuffer);</span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; "> speex_encode_int(EncoderState,(short*)pbBuffer, &stSpeexBits);</span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font size="2" color="black" face="Trebuchet MS"><span style="font-size: 10pt; font-family: 'Trebuchet MS'; color: black; "> </span></font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; "><font class="Apple-style-span" face="'Trebuchet MS'">I dump the output of the buffer after calling speex_preprocess_run and play it using some media player tool but I dont hear any audio as if the complete audio has been removed. Am i following the right steps, is there else i need to do along with the steps i have written above.</font></p>
<p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; "><font class="Apple-style-span" face="'Trebuchet MS'"><br></font></p><p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; ">
<font class="Apple-style-span" face="'Trebuchet MS'">Thanks</font></p><p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; "><font class="Apple-style-span" face="'Trebuchet MS'">Gurinder</font></p>
</span>