SpeexDSPSharp SpeexDSPSharp
SpeexDSPSharp SpeexDSPSharp
DocFX + Singulink = ♥

Search Results for

    Edit this page

    Class SpeexDSPPreprocessor

    Speexdsp preprocessor.

    Inheritance
    object
    SpeexDSPPreprocessor
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SpeexDSPSharp.Core
    Assembly: SpeexDSPSharp.Core.dll
    Syntax
    public class SpeexDSPPreprocessor

    Constructors

    | Edit this page View Source

    SpeexDSPPreprocessor(int, int)

    Creates a new speexdsp echo canceler.

    Declaration
    public SpeexDSPPreprocessor(int frame_size, int sample_rate)
    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 canceller for residual echo cancellation to work.

    int sample_rate

    Sampling rate used for the input.

    Fields

    | Edit this page View Source

    _handler

    Direct safe handle for the SpeexDSPPreprocessor. IT IS NOT RECOMMENDED TO CLOSE THE HANDLE DIRECTLY! Instead use Dispose(bool) to dispose the handle and object safely.

    Declaration
    protected readonly SpeexDSPPreprocessStateSafeHandler _handler
    Field Value
    Type Description
    SpeexDSPPreprocessStateSafeHandler

    Methods

    | Edit this page View Source

    CheckError(int)

    Checks if there is a speexdsp error and throws if the error is a negative value.

    Declaration
    protected static void CheckError(int error)
    Parameters
    Type Name Description
    int error

    The error code to input.

    Exceptions
    Type Condition
    SpeexDSPException
    | Edit this page View Source

    Ctl<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.

    | Edit this page View Source

    Dispose()

    Declaration
    public void Dispose()
    | Edit this page View Source

    Dispose(bool)

    Dispose logic.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Set to true if fully disposing.

    | Edit this page View Source

    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).

    | Edit this page View Source

    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).

    | Edit this page View Source

    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).

    | Edit this page View Source

    EstimateUpdate(Span<byte>)

    Update preprocessor state, but do not compute the output.

    Declaration
    public void EstimateUpdate(Span<byte> x)
    Parameters
    Type Name Description
    Span<byte> x

    Audio sample vector (in only). Must be same size as specified in SpeexDSPPreprocessor(int, int).

    | Edit this page View Source

    EstimateUpdate(Span<short>)

    Update preprocessor state, but do not compute the output.

    Declaration
    public void EstimateUpdate(Span<short> x)
    Parameters
    Type Name Description
    Span<short> x

    Audio sample vector (in only). Must be same size as specified in SpeexDSPPreprocessor(int, int).

    | Edit this page View Source

    EstimateUpdate(Span<float>)

    Update preprocessor state, but do not compute the output.

    Declaration
    public void EstimateUpdate(Span<float> x)
    Parameters
    Type Name Description
    Span<float> x

    Audio sample vector (in only). Must be same size as specified in SpeexDSPPreprocessor(int, int).

    | Edit this page View Source

    ~SpeexDSPPreprocessor()

    Speexdsp preprocessor destructor.

    Declaration
    protected ~SpeexDSPPreprocessor()
    | Edit this page View Source

    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.

    | Edit this page View Source

    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.

    | Edit this page View Source

    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.

    | Edit this page View Source

    Run(Span<byte>)

    Preprocess a frame.

    Declaration
    public int Run(Span<byte> x)
    Parameters
    Type Name Description
    Span<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.

    | Edit this page View Source

    Run(Span<short>)

    Preprocess a frame.

    Declaration
    public int Run(Span<short> x)
    Parameters
    Type Name Description
    Span<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.

    | Edit this page View Source

    Run(Span<float>)

    Preprocess a frame.

    Declaration
    public int Run(Span<float> x)
    Parameters
    Type Name Description
    Span<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.

    | Edit this page View Source

    ThrowIfDisposed()

    Throws an exception if this object is disposed or the handler is closed.

    Declaration
    protected virtual void ThrowIfDisposed()
    Exceptions
    Type Condition
    ObjectDisposedException