Verbara.Sdk.VoiceAi.AudioSocket 2.2.0

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

Verbara.Sdk.VoiceAi.AudioSocket

AudioSocket transport for Verbara.Sdk.VoiceAi — bridges Asterisk AudioSocket streams into the Voice AI pipeline.

Installation

dotnet add package Verbara.Sdk.VoiceAi.AudioSocket

Quick Start

// Register as a hosted service (DI lifecycle managed)
services.AddAudioSocketServer(opts =>
{
    opts.ListenAddress = "0.0.0.0";
    opts.Port = 9092;
    opts.MaxConcurrentSessions = 100;
});

// Handle sessions manually (without VoiceAi pipeline)
var server = app.Services.GetRequiredService<AudioSocketServer>();
server.OnSessionStarted += async session =>
{
    await foreach (var frame in session.ReadAudioAsync(ct))
    {
        // process 20 ms PCM16 frames from Asterisk
    }
    await session.WriteAudioAsync(responseAudio, ct);
};

Features

  • AudioSocketServerIHostedService TCP server; accepts Asterisk AudioSocket connections
  • AudioSocketSession — per-call session with ReadAudioAsync() and WriteAudioAsync() for 20 ms PCM16 frames
  • UUID handshake: automatically reads the channel UUID frame from Asterisk on connection
  • OnSessionStarted event for routing sessions to custom handlers
  • AddAudioSocketServer() DI extension for one-line registration
  • Zero-copy System.IO.Pipelines framing; 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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Verbara.Sdk.VoiceAi.AudioSocket:

Package Downloads
Verbara.Sdk.VoiceAi

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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.1 230 5/23/2026
2.2.0 170 5/20/2026
2.1.2 168 5/8/2026
2.1.1 159 5/7/2026
2.1.0 776 5/7/2026
2.0.0 154 5/6/2026