Android-Audio-Processing-Using-WebRTC icon indicating copy to clipboard operation
Android-Audio-Processing-Using-WebRTC copied to clipboard

If i want to change the SAMPLE_RATE from 16000 to 8000, how can i do?

Open tongma opened this issue 1 year ago • 0 comments

If i want to change the SAMPLE_RATE from 16000 to 8000, how can i do? I tried to change SAMPLE_RATE from 16000 to 8000, and change the code private static final int SAMPLE_RATE = 16000; private static final int BITS_PER_SAMPLE = 16;

   private static final int SAMPLE_RATE = 16000;

        soundtouch.setSampleRate(16000);
        soundtouch.setChannels(1);

to private static final int SAMPLE_RATE = 8000; private static final int BITS_PER_SAMPLE = 16;

   private static final int SAMPLE_RATE = 8000;

        soundtouch.setSampleRate(8000);
        soundtouch.setChannels(1);

then the voice is not right.

Which code should i change ? would you please kindly help to give me a reply soon? Thanks in advance!

tongma avatar Jan 25 '24 03:01 tongma