Verbara.Sdk.Audio 2.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Verbara.Sdk.Audio --version 2.1.1
                    
NuGet\Install-Package Verbara.Sdk.Audio -Version 2.1.1
                    
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="Verbara.Sdk.Audio" Version="2.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Verbara.Sdk.Audio" Version="2.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Verbara.Sdk.Audio" />
                    
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 Verbara.Sdk.Audio --version 2.1.1
                    
#r "nuget: Verbara.Sdk.Audio, 2.1.1"
                    
#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 Verbara.Sdk.Audio@2.1.1
                    
#: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=Verbara.Sdk.Audio&version=2.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Verbara.Sdk.Audio&version=2.1.1
                    
Install as a Cake Tool

Verbara.Sdk.Audio

Audio processing library for Verbara.Sdk — resampling, format conversion, gain, and silence detection.

Installation

dotnet add package Verbara.Sdk.Audio

Quick Start

// Resample from 8 kHz (Asterisk native) to 16 kHz (AI model input)
var resampler = ResamplerFactory.Create(8000, 16000);
var input = AudioFormat.Slin16Mono8kHz;
var output = AudioFormat.Slin16Mono16kHz;

var maxBytes = resampler.MaxOutputBytes(inputBytes.Length);
var outBuf = new byte[maxBytes];
var written = resampler.Process(inputBytes, outBuf);

// Convert PCM16 to normalized float32 for AI model inference
var shorts = MemoryMarshal.Cast<byte, short>(inputBytes.AsSpan());
var floats = new float[shorts.Length];
AudioProcessor.ConvertToFloat32(shorts, floats);

// Silence detection (default -40 dBFS threshold)
if (AudioProcessor.IsSilence(shorts))
    Console.WriteLine("Silence detected");

Features

  • ResamplerFactory — polyphase resampler for 12 telephony rate pairs (8/16/24/48 kHz)
  • AudioProcessor — PCM16↔float32 conversion, gain (dB), RMS energy, silence detection
  • AudioFormat — immutable value type with predefined telephony formats (Slin16Mono8kHz, Float32Mono16kHz, etc.)
  • IAudioTransform — chainable processing interface for custom pipeline stages
  • Zero-alloc Span<T>-based API throughout; Native AOT compatible

Documentation

See the main README for full documentation.

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 (4)

Showing the top 4 NuGet packages that depend on Verbara.Sdk.Audio:

Package Downloads
Verbara.Sdk.VoiceAi.AudioSocket

AudioSocket transport for Verbara.Sdk — bidirectional PCM audio streaming over TCP using the Asterisk AudioSocket protocol.

Verbara.Sdk.VoiceAi

Voice AI pipeline for Verbara.Sdk — orchestration layer for STT, TTS and conversation with turn-taking and barge-in detection.

Verbara.Sdk.VoiceAi.OpenAiRealtime

OpenAI Realtime API bridge for Verbara.Sdk.VoiceAi — connects Asterisk AudioSocket directly to GPT-4o in real time, with function calling and observability. Zero third-party dependencies.

Verbara.Sdk.VoiceAi.TurnDetection

ML-based turn detection for Verbara.Sdk VoiceAi pipeline using Pipecat smart-turn-v3 ONNX model.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.1 225 5/23/2026
2.2.0 180 5/20/2026
2.1.2 182 5/8/2026
2.1.1 163 5/7/2026
2.1.0 708 5/7/2026
2.0.0 167 5/6/2026