Verbara.Sdk.Audio
2.0.0
See the version list below for details.
dotnet add package Verbara.Sdk.Audio --version 2.0.0
NuGet\Install-Package Verbara.Sdk.Audio -Version 2.0.0
<PackageReference Include="Verbara.Sdk.Audio" Version="2.0.0" />
<PackageVersion Include="Verbara.Sdk.Audio" Version="2.0.0" />
<PackageReference Include="Verbara.Sdk.Audio" />
paket add Verbara.Sdk.Audio --version 2.0.0
#r "nuget: Verbara.Sdk.Audio, 2.0.0"
#:package Verbara.Sdk.Audio@2.0.0
#addin nuget:?package=Verbara.Sdk.Audio&version=2.0.0
#tool nuget:?package=Verbara.Sdk.Audio&version=2.0.0
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 detectionAudioFormat— 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 | Versions 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. |
-
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.