title: How to get microphone voice level from ByteArray(pcmBuffer)?
body: <p>I have to display microphone voice level, we are displaying seekbar which will increase when when someone is speaking and decrease when there is silence, i don't know what this is called technically, but by doing some research i have found that its called decibel(dB).</p>
  <p>There are many answers i have checked <a href="https://stackoverflow.com/questions/7197798/get-the-microphone-sound-level-decibel-level-in-android#:%7E:text=You%20can%20use%20MediaRecorder.,getMaxAmplitude()%20.&amp;text=Get%20the%20noise%20level%20using,mRecorder%20%3D%20new%20MediaRecorder()%3B%20mRecorder.">Get the Microphone sound level ( Decibel level)</a> but i'm not using <code>MediaRecorder</code> so i can't get amplitude as stated in answer, i only have <code>ByteArray</code> of current microphone input.</p>
  <p><strong>Now my main question is how i can get microphone voice level(or maybe decibel) from only having <code>ByteArray</code>?</strong></p>
  <p>I have also checked many other questions like:<br />
  <a href="https://stackoverflow.com/questions/14181449/android-detect-sound-level">android-detect-sound-level</a>.<br />
  <a href="https://stackoverflow.com/questions/30793692/android-how-to-find-decibels">android-find-decibels</a>.</p>
  <p>But most of them suggest to use formula which depends on amplitude or anything else related to amplitude like <a href="https://stackoverflow.com/questions/6571894/calculate-decibel-from-amplitude-android-media-recorder">aplitudeRef</a>, so please let me know can i get voice level with only having <code>ByteArray</code> of <strong>pcm buffer</strong></p>