mail2chromium / Android-Audio-Processing-Using-WebRTC

All in all WebRTC. A Complete Guide to enable Rich and High Quality of **Real-Time Voice Communication** on Android Platform. This repository involves a complete understanding, implementation and documentation related to WebRTC Audio Processing.
144 stars 49 forks source link

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

Open tongma opened 7 months ago

tongma commented 7 months ago

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!