问题描述:

I am making TalkingTomcat like app. I am recording voice using android audio recorder and using libsonic I am playing sound by changing pitch. but during playing sound it give a lot of noise.

Even i am playing sound sample using audio track then also it give noice.

I am using 44100 sample rate and MONO and 16 bits.

If anyone can help me please help me. Or give me another way to achieve this.

网友答案:

have you played with NoiseSuppressor? "Noise suppression (NS) is an audio pre-processing which removes background noise from the captured signal"

网友答案:

You can do noise removal at the pre-processing stage. Here I have filtered the audible range for speech & music. I found this to be very effective during my tests as opposed to NoiseSuppressor. Usage and utility methods,

recorder.read(data, 0, data.length);
if(isAudible(data)) {
    // TODO further processing can go here
}

public static boolean isAudible(short[] data) {
    double rms = getRootMeanSquared(data);
    return (rms > 198 && 5600 > rms);
}

public static double getRootMeanSquared(short[] data) {
    double ms = 0;
    for (int i = 0; i < data.length; i++) {
        ms += data[i] * data[i];
    }
    ms /= data.length;
    return Math.sqrt(ms);
}
相关阅读:
Top