title: Detect human voice from audio file input
body: <p>I am trying to implement automatic voice recording functionality, similar to the Talking Tom app.  I use the following code to read input from the audio recorder and analyse the buffer :</p>
  
  <pre><code> float totalAbsValue = 0.0f;
   short sample = 0;
  
   numberOfReadBytes = audioRecorder.read( audioBuffer, 0, bufferSizeInBytes);
  
   // Analyze Sound.
   for( int i=0; i&lt;bufferSizeInBytes; i+=2 )
   {
       sample = (short)( (audioBuffer[i]) | audioBuffer[i + 1] &lt;&lt; 8 );
       totalAbsValue += Math.abs( sample ) / (numberOfReadBytes/2);
   }
  
   // Analyze temp buffer.
   tempFloatBuffer[tempIndex%3] = totalAbsValue;
   float temp = 0.0f; 
  
   for( int i=0; i&lt;3; ++i )
   temp += tempFloatBuffer[i];
  </code></pre>
  
  <p>Now I am able to detect voice input coming from the audio recorder and I can analyse the audio buffer.  </p>
  
  <p>The buffer is converted to an float value and if it increases by a certain amount, it is assumed that there is some sound in the background and recording is started.  But the problem is that the app starts recording all background noise, including fan/AC duct sounds.</p>
  
  <p>Can anyone help me with analysing the buffer to detect human voice only? Or are there any other alternative ways to detect human voice from the audio recorder input?</p>
  
  <p>Thanks in advance,</p>