gribunin / SpeexPreprocessor

Speex preprocessor wrapper for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpeexPreprocessor

Speex preprocessor wrapper for .NET

SpeexPreprocessor is a wrapper for the speex codec built-in preprocessor. The original documentation is available here: https://www.speex.org/docs/api/speex-api-reference/group__SpeexPreprocessState.html

The entire speex preprocessor code is compiled into the wrapper and the library doesn't have any additional dependencies.

This library allows to perform the following operations with audio in .Net program:

  • AGC;
  • Denoise:
  • Dereverberation.

How to use

  1. First create an instance of SpeexPreprocessor:
var preprocessor = new Preprocessor(frameSize, sampleRate);
  1. Set required properties (AGC, AGC values, Dereverb. Denoise:
                preprocessor.Agc = cbAgc.Checked;
                preprocessor.Dereverb = cbDereverb.Checked;
                preprocessor.Denoise = cbDenoise.Checked;
                preprocessor.AgcLevel = tbAgcLevel.Value;
                preprocessor.AgcMaxGain = tbAgcMaxGain.Value;
                preprocessor.AgcIncrement = tbAgcIncrement.Value;
                preprocessor.AgcDecrement = tbAgcDecrement.Value;
  1. Start processing audio (read from file, captured from the sound device or received via network stream) in a loop, feeding each audio sample buffer to the preprocessor:
preprocessor.Run(_speexFrameBuffer);

About

Speex preprocessor wrapper for .NET


Languages

Language:C 97.6%Language:C# 1.4%Language:C++ 0.8%Language:MATLAB 0.2%