tryAGI.SpeexDspSharp 1.0.0

Prefix Reserved
dotnet add package tryAGI.SpeexDspSharp --version 1.0.0
                    
NuGet\Install-Package tryAGI.SpeexDspSharp -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="tryAGI.SpeexDspSharp" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="tryAGI.SpeexDspSharp" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="tryAGI.SpeexDspSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add tryAGI.SpeexDspSharp --version 1.0.0
                    
#r "nuget: tryAGI.SpeexDspSharp, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package tryAGI.SpeexDspSharp@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=tryAGI.SpeexDspSharp&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=tryAGI.SpeexDspSharp&version=1.0.0
                    
Install as a Cake Tool

SpeexDspSharp

C# bindings for SpeexDSP echo cancellation and preprocessing with bundled native runtime libraries.

The NuGet package id is tryAGI.SpeexDspSharp. The public namespace remains SpeexDspSharp.

Installation

dotnet add package tryAGI.SpeexDspSharp

Echo Cancellation

using SpeexDspSharp;

var sampleRate = 16000;
var frameSize = sampleRate / 50; // 20 ms
var filterLength = sampleRate / 5; // 200 ms

using var echo = new SpeexEchoState(sampleRate, frameSize, filterLength);

var playback = new short[frameSize];
var microphone = new short[frameSize];
var cleaned = new short[frameSize];

echo.RegisterPlayback(playback);
echo.Capture(microphone, cleaned);

SpeexEchoState wraps SpeexDSP's streaming API. Playback and capture frames must be exactly FrameSize 16-bit mono samples.

Native Libraries

The package contains native runtime assets under NuGet runtimes/<rid>/native/:

  • runtimes/win-x64/native/speexdsp.dll
  • runtimes/osx-x64/native/libspeexdsp.dylib
  • runtimes/osx-arm64/native/libspeexdsp.dylib
  • runtimes/linux-x64/native/libspeexdsp.so
  • runtimes/linux-arm64/native/libspeexdsp.so

The native binaries are committed in natives/ so consumers do not need a system SpeexDSP installation.

Refreshing Native Binaries

Run the refresh script from the repository root:

natives/refresh.sh

The script stages Linux binaries from Debian packages, Windows x64 from MSYS2, and macOS from Homebrew.

Build And Test

dotnet build SpeexDspSharp.slnx
dotnet test src/tests/SpeexDspSharp.Tests/SpeexDspSharp.Tests.csproj
dotnet pack src/libs/SpeexDspSharp/SpeexDspSharp.csproj -c Release

License

SpeexDspSharp is licensed under MIT. Bundled SpeexDSP native binaries retain the upstream BSD license; see THIRD-PARTY-NOTICES.md.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 1,087 6/25/2026