How to implement Noise Reduction?

This article is a brief introduction about implementing noise reduction in relation with Ozeki VoIP SIP SDK. After reading through this page you will be fully familiar with all the essential terms concerning noise reduction technology and what you will need for creating your own solution using Ozeki VoIP SIP SDK.

What is noise reduction? How does it work?

Noise reduction is the process of removing noise from a signal. All recording devices, both analogue and digital, have traits which make them susceptible to noise. Noise can be random or white noise with no coherence, or coherent noise introduced by the device's mechanism or processing algorithms.

In VoIP communication noise reduction plays a big part as the voice communication can contain loads of background noises. The background noises can be reduced with implementing some standard algorithms. Ozeki VoIP SIP SDK provides the basic noise reduction support that you can use in your VoIP solutions.

How to implement Noise Reduction using C#?

The noise reduction feature is implemented in Ozeki VoIP SDK in the AudioQualityEnhancer class, which is a media handler. You can use the AudioQualityEnhancer object to set the noise reduction level to Low, Medium, High or NoReduction. This can be done through the NoiseReductionLevel property.
To learn more about media handlers, please visit the Managing Media Handler article.

The AudioQualityEnhancer object can be initialized. As the object can also be used for acoustic echo cancellation, you can set the echo source for the object too.

The AudioQualityEnhancer is a MediaHandler that needs to be set in the audio transmission line of the softphone. The outgoingDataMixerobject is an AudioDataMixerHandler that is also needed for mixing the incoming data with the result of noise reduction and/or echo cancellation features.

Noise Reduction example in C#

using System;
using Ozeki.Media;

namespace Noise_Reduction
{
    class Program
    {
        static Microphone microphone;
        static Speaker speaker;
        static MediaConnector connector;
        static AudioQualityEnhancer audioProcessor;

        static void Main(string[] args)
        {
            microphone = Microphone.GetDefaultDevice();
            speaker = Speaker.GetDefaultDevice();
            connector = new MediaConnector();
            audioProcessor = new AudioQualityEnhancer();

            audioProcessor.NoiseReductionLevel = NoiseReductionLevel.Medium;
            audioProcessor.SetEchoSource(speaker);

            connector.Connect(microphone, audioProcessor);
            connector.Connect(audioProcessor, speaker);

            microphone.Start();
            speaker.Start();

            Console.ReadLine();
        }
    }
}

Related Pages

More information