Class SpeexDSPPreprocessor
Speexdsp preprocessor.
Inherited Members
Namespace: SpeexDSPSharp.Core
Assembly: SpeexDSPSharp.Core.dll
Syntax
public class SpeexDSPPreprocessor : ISpeexDSPPreprocessor, IDisposable
Constructors
| Edit this page View SourceSpeexDSPPreprocessor(int, int, bool?)
Creates a new speexdsp echo canceler.
Declaration
public SpeexDSPPreprocessor(int frame_size, int sample_rate, bool? use_static = null)
Parameters
| Type | Name | Description |
|---|---|---|
| int | frame_size | Number of samples to process at one time (should correspond to 10-20 ms). Must be the same value as that used for the echo canceler for residual echo cancellation to work. |
| int | sample_rate | Sampling rate used for the input. |
| bool? | use_static | Set to true to force static imports, false to force dynamic imports, or null to auto-select based on platform. |
Fields
| Edit this page View Source_preprocessor
Direct speex preprocessor for SpeexDSPPreprocessor. You can close this directly.
Declaration
protected ISpeexDSPPreprocessor _preprocessor
Field Value
| Type | Description |
|---|---|
| ISpeexDSPPreprocessor |
Methods
| Edit this page View SourceCtl<T>(PreprocessorCtl, ref T)
Performs a ctl request.
Declaration
public int Ctl<T>(PreprocessorCtl request, ref T value) where T : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| PreprocessorCtl | request | The request you want to specify. |
| T | value | The input/output value. |
Returns
| Type | Description |
|---|---|
| int |
Type Parameters
| Name | Description |
|---|---|
| T | The type you want to input/output. |
Dispose()
Declaration
public void Dispose()
EstimateUpdate(byte[])
Update preprocessor state, but do not compute the output.
Declaration
public void EstimateUpdate(byte[] x)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | x | Audio sample vector (in only). Must be same size as specified in SpeexDSPPreprocessor(int, int). |
EstimateUpdate(short[])
Update preprocessor state, but do not compute the output.
Declaration
public void EstimateUpdate(short[] x)
Parameters
| Type | Name | Description |
|---|---|---|
| short[] | x | Audio sample vector (in only). Must be same size as specified in SpeexDSPPreprocessor(int, int). |
EstimateUpdate(float[])
Update preprocessor state, but do not compute the output.
Declaration
public void EstimateUpdate(float[] x)
Parameters
| Type | Name | Description |
|---|---|---|
| float[] | x | Audio sample vector (in only). Must be same size as specified in SpeexDSPPreprocessor(int, int). |
Run(byte[])
Preprocess a frame.
Declaration
public int Run(byte[] x)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | x | Audio sample vector (in and out). Must be same size as specified in SpeexDSPPreprocessor(int, int). |
Returns
| Type | Description |
|---|---|
| int | Bool value for voice activity (1 for speech, 0 for noise/silence), ONLY if VAD turned on. |
Run(short[])
Preprocess a frame.
Declaration
public int Run(short[] x)
Parameters
| Type | Name | Description |
|---|---|---|
| short[] | x | Audio sample vector (in and out). Must be same size as specified in SpeexDSPPreprocessor(int, int). |
Returns
| Type | Description |
|---|---|
| int | Bool value for voice activity (1 for speech, 0 for noise/silence), ONLY if VAD turned on. |
Run(float[])
Preprocess a frame.
Declaration
public int Run(float[] x)
Parameters
| Type | Name | Description |
|---|---|---|
| float[] | x | Audio sample vector (in and out). Must be same size as specified in SpeexDSPPreprocessor(int, int). |
Returns
| Type | Description |
|---|---|
| int | Bool value for voice activity (1 for speech, 0 for noise/silence), ONLY if VAD turned on. |