HPD-Agent.Providers.Audio.OpenAI 0.9.5

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

HPD-Agent.Providers.Audio.OpenAI

OpenAI speech-to-text, text-to-speech, and realtime adapters for HPD-Agent.Audio.

Install

dotnet add package HPD-Agent.Audio
dotnet add package HPD-Agent.Providers.Audio.OpenAI
dotnet add package HPD-Agent.Providers.OpenAI

The package registers the openai/platform provider contribution. It composes with HPD-Agent.Providers.OpenAI, so the same application can use OpenAI chat, embeddings, STT, TTS, and realtime clients without duplicate provider registration.

Authentication

The default secret aliases are:

  • OPENAI_API_KEY
  • OPENAI_ENDPOINT

For runtime-only literal keys, use the ReadOnlySpan<char> overloads of the builder extensions. HPD registers the key without persisting it in agent configuration.

Speech-to-text

using HPD.Agent;
using HPD.Agent.Audio;
using HPD.Agent.Providers.Audio.OpenAI;

var agent = await AgentBuilder.Create()
    .WithChatClient(chatClient)
    .WithContentStore(contentStore)
    .WithOpenAISpeechToText("gpt-4o-transcribe")
    .WithAudio(audio =>
    {
        audio.InputMode = AudioInputMode.BatchSpeechToText;
        audio.OutputMode = AudioOutputMode.TextOnly;
    })
    .BuildAsync();

Supported audio models include whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe, and gpt-transcribe. Use OpenAISttOptions for response format, prompt, temperature, timestamps, and logprobs.

Text-to-speech

.WithOpenAITextToSpeech(
    model: "gpt-4o-mini-tts",
    voice: "alloy",
    outputFormat: "mp3")
.WithAudio(audio =>
{
    audio.OutputMode = AudioOutputMode.TextToSpeech;
    audio.AssistantOutputMode = AssistantOutputSynthesisMode.FinalText;
})

Supported TTS models are tts-1, tts-1-hd, and gpt-4o-mini-tts. The OpenAI adapter supports completed-text synthesis; it does not advertise provider-native incremental text input.

Realtime

.WithOpenAIRealtime("gpt-realtime")
.WithAudio(audio =>
{
    audio.InputMode = AudioInputMode.ProviderRealtime;
    audio.OutputMode = AudioOutputMode.ProviderRealtimeAudio;
})

The default realtime model is gpt-realtime. Realtime failures and user input transcripts are observable through AgentEvent subscriptions. Input transcript failures include structured ProviderErrorInfo when the provider supplies an error code.

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 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

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
0.9.5 103 11/10/2026
0.9.2 125 11/2/2026
0.9.1 151 10/21/2026
0.9.0 117 10/20/2026
0.8.1 174 8/6/2026
0.8.0 121 8/5/2026
0.7.0 138 7/19/2026
0.6.0 145 7/4/2026
0.5.5 134 6/21/2026
0.5.0 136 6/11/2026