Home Removing Noise from mixed Audio
Reply: 0

Removing Noise from mixed Audio

KnowAmit
1#
KnowAmit Published in 2017-12-05 12:18:36Z

I am trying to remove the noise from a mixed audio using following Code

File outPutFile = new File("/sdcard/Podcasts/repeatedamitAudio123.wav");
File backgroundFile = new File("/sdcard/Podcasts/gt2.wav");
File recordingFile = new File("/sdcard/Podcasts/AUD_20171201_182916.wav");
try {
        Sound backgroundSound = start().withFile(backgroundFile).convertIntoSound().stopWithSound();
        Sound recordingSound = start().withFile(recordingFile).convertIntoSound().stopWithSound();
        FormatInfo backgroundFormatInfo = backgroundSound.getFormatInfo();
        FormatInfo recordingFormatInfo = recordingSound.getFormatInfo();
        float ratio = (backgroundFormatInfo.getSampleSize() * backgroundFormatInfo.getSampleRate()) /
                (recordingFormatInfo.getSampleSize() * recordingFormatInfo.getSampleRate());
        Sound repeatSound = start().withSound(backgroundSound).loop((int) (recordingSound.getSamplesLength() * ratio)).stopWithSound();
        Sound withoutNoise = start().withSound(recordingSound).apply(new ReduceNoiseSoundTransform(0.0f)).stopWithSound();
        Sound withoutNoiseRepeat = start().withSound(repeatSound).apply(new ReduceNoiseSoundTransform(0.0f)).stopWithSound();
        Sound mixedSound = start().withSound(withoutNoise).mixWith(withoutNoiseRepeat).stopWithSound();
        start().withSound(mixedSound).apply(new ReduceNoiseSoundTransform(0.0f)).exportToFile(outPutFile);

    } catch (SoundTransformException e) {
        e.printStackTrace();
    }

I am using Soundtranform lib libetl/soundtransform

Please help with removing Noise from Mixed Audio in Android Code.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.308264 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO