title: Reduce size of Recording Sound in Android in wav format
body: <p>I am using this code to record a wav file. However 10 second audio is create 500kb file. How can i reduce the size. This is too much for 10 seconds voice.</p>
  
  <pre><code>private static final int RECORDER_BPP = 16;
  private static final String AUDIO_RECORDER_FILE_EXT_WAV = ".wav";
  private static final String AUDIO_RECORDER_FOLDER = "AudioRecorder";
  private static final String AUDIO_RECORDER_TEMP_FILE = "record_temp.raw";
  private static final int RECORDER_SAMPLERATE = 11025;
  private static final int RECORDER_CHANNELS = AudioFormat.CHANNEL_IN_STEREO;
  private static final int RECORDER_AUDIO_ENCODING = AudioFormat.ENCODING_PCM_16BIT;
  
  private AudioRecord recorder = null;
  private int bufferSize = 0;
  private Thread recordingThread = null;
  private boolean isRecording = false;
  
  private String mainFilename;
  private String tempFilename;
  
  private Context mContext;
  /**
   * Creates a new audio recording at the given path (relative to root of SD card).
   */
  public WavAudioRecorder(Activity mContext)
  {
      this.mContext = mContext;
      bufferSize = AudioRecord.getMinBufferSize(4000,
              AudioFormat.CHANNEL_IN_MONO,
              AudioFormat.ENCODING_PCM_16BIT);
  
      tempFilename = getTempFilename();
      mainFilename = getFilename();
  }
  
  /**
   * Starts a new recording.
   */
  public void start() throws IOException
  {
      recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,
              RECORDER_SAMPLERATE, RECORDER_CHANNELS,RECORDER_AUDIO_ENCODING, bufferSize);
      int i = recorder.getState();
      if(i==1)
          recorder.startRecording();
  
      isRecording = true;
  
      recordingThread = new Thread(new Runnable() {
  
          @Override
          public void run() {
              writeAudioDataToFile();
          }
      },"AudioRecorder Thread");
  
      recordingThread.start();
  
  }
  </code></pre>