SIPSorcery.OpenAI.WebRTC
8.0.1-pre
See the version list below for details.
dotnet add package SIPSorcery.OpenAI.WebRTC --version 8.0.1-pre
NuGet\Install-Package SIPSorcery.OpenAI.WebRTC -Version 8.0.1-pre
<PackageReference Include="SIPSorcery.OpenAI.WebRTC" Version="8.0.1-pre" />
<PackageVersion Include="SIPSorcery.OpenAI.WebRTC" Version="8.0.1-pre" />
<PackageReference Include="SIPSorcery.OpenAI.WebRTC" />
paket add SIPSorcery.OpenAI.WebRTC --version 8.0.1-pre
#r "nuget: SIPSorcery.OpenAI.WebRTC, 8.0.1-pre"
#:package SIPSorcery.OpenAI.WebRTC@8.0.1-pre
#addin nuget:?package=SIPSorcery.OpenAI.WebRTC&version=8.0.1-pre&prerelease
#tool nuget:?package=SIPSorcery.OpenAI.WebRTC&version=8.0.1-pre&prerelease
SIPSorcery.OpenAI.WebRTC
This repository contains a .NET library for interacting with OpenAI's real-time WebRTC API. It provides helper classes to negotiate peer connections, send and receive Opus audio frames and exchange control messages over a data channel.
Features
- Establish a
RTCPeerConnection
with OpenAI using a REST based signalling helper. - Send audio samples or pipe them from existing SIPSorcery media end points.
- Receive audio and transcript events via the data channel.
DataChannelMessenger
class to assist with sending session updates, function call results and response prompts.- Designed to work with dependency injection or standalone instances.
Building
# Build the library and all example projects
dotnet build
The solution files are located under src/
and examples/
.
Examples
Several sample applications demonstrating different scenarios are available in the examples
folder:
- GetStarted – minimal console program that connects your microphone to OpenAI.
- AliceAndBob – runs two OpenAI peers and routes their audio between each other with a waveform display.
- LocalFunctions – showcases the local function calling feature.
- GetPaid – extends local functions to simulate payment requests.
- DependencyInjection – illustrates using the library with .NET DI.
- BrowserBridge – ASP.NET Core application bridging a browser WebRTC client to OpenAI.
Each example folder contains its own README with usage instructions.
License
Distributed under the BSD 3‑Clause license with an additional BDS BY‑NC‑SA restriction. See LICENSE.md for details.
Product | Versions 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 was computed. 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. |
-
net8.0
- LanguageExt.Core (>= 4.4.9)
- Microsoft.Extensions.Http (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- SIPSorcery (>= 8.0.20-pre)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
-v8.0.1-pre: Initial version.