ElevenLabs.AspNetCore 1.1.0

dotnet add package ElevenLabs.AspNetCore --version 1.1.0
                    
NuGet\Install-Package ElevenLabs.AspNetCore -Version 1.1.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="ElevenLabs.AspNetCore" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ElevenLabs.AspNetCore" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="ElevenLabs.AspNetCore" />
                    
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 ElevenLabs.AspNetCore --version 1.1.0
                    
#r "nuget: ElevenLabs.AspNetCore, 1.1.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 ElevenLabs.AspNetCore@1.1.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=ElevenLabs.AspNetCore&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=ElevenLabs.AspNetCore&version=1.1.0
                    
Install as a Cake Tool

ElevenLabs.AspNetCore

ASP.NET Core integration for the ElevenLabs .NET SDK. It attaches a Speech Engine server to your application's request pipeline, so ElevenLabs can connect to your app over WebSocket and you can answer each user transcript with your own logic.

The attach helper lives in this package rather than in ElevenLabs.Net so that console, worker and desktop apps using the core SDK do not take a dependency on the ASP.NET Core shared framework.

Install

dotnet add package ElevenLabs.AspNetCore

This also installs ElevenLabs.Net.

Usage

using ElevenLabs.SpeechEngine;

var app = WebApplication.CreateBuilder(args).Build();

var engine = new SpeechEngineResource(
    "your-speech-engine-id",
    Environment.GetEnvironmentVariable("ELEVENLABS_API_KEY")
);

engine.Attach(app, "/speech-engine", new SpeechEngineCallbacks
{
    OnTranscript = (messages, cancellationToken, session) =>
    {
        // Replace with a call to your LLM. cancellationToken is cancelled when the user speaks again.
        session.SendResponse($"You said: {messages[^1].Content}");
        return Task.CompletedTask;
    },
});

app.Run();

Attach enables WebSockets, accepts connections on the given path, and rejects any request without a valid X-ElevenLabs-Speech-Engine-Authorization token signed for your API key. It returns a SpeechEngineAttachment; call Close() on it to stop accepting new connections without stopping the app.

To verify a request in your own endpoint instead, call engine.VerifyRequest(httpContext.Request).

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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

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.1.0 76 12/2/2026
1.0.0 95 11/26/2026