ElBruno.PersonaPlex 0.6.0

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

ElBruno.PersonaPlex

NuGet NuGet Downloads Build Status License: MIT GitHub stars Twitter Follow

HuggingFace Models: PersonaPlex ONNX PersonaPlex Original

Run NVIDIA PersonaPlex-7B-v1 full-duplex speech-to-speech locally from C# using ONNX Runtime — no Python needed at inference time. Models are downloaded automatically on first run.

Pre-exported ONNX models are hosted on HuggingFace: elbruno/personaplex-7b-v1-onnx

Features

  • Local Speech-to-Speech Inference — Run PersonaPlex entirely on your machine using ONNX Runtime
  • Automatic Model Download — Models download from HuggingFace on first run
  • Full-Duplex Capable — Based on NVIDIA's Moshi architecture for simultaneous listen + speak
  • Persona Control — Text-based role prompts for customizable AI personas
  • Voice Selection — Multiple pre-packaged voice embeddings (Natural + Variety voices)
  • GPU Acceleration — Optional CUDA or DirectML support via SessionOptions injection
  • Multi-Language — Supports conversational interactions in English
  • Shared Model Cache — Models stored once in %LOCALAPPDATA%/ElBruno/PersonaPlex, shared across all apps

Quick Start

Install via NuGet

dotnet add package ElBruno.PersonaPlex

Basic usage in C#

using ElBruno.PersonaPlex.Pipeline;

// Models download automatically on first run
using var pipeline = await PersonaPlexPipeline.CreateAsync("models");

// Speech-to-speech with persona
await pipeline.ProcessAsync(
    inputAudioPath: "input.wav",
    voicePreset: VoicePreset.NATF2,
    textPrompt: "You are a friendly assistant.",
    outputPath: "output.wav");

GPU Acceleration

using ElBruno.PersonaPlex.Pipeline;

// CUDA (NVIDIA)
var pipeline = await PersonaPlexPipeline.CreateAsync(
    sessionOptionsFactory: SessionOptionsHelper.CreateCudaOptions);

// DirectML (any GPU on Windows)
var pipeline = await PersonaPlexPipeline.CreateAsync(
    sessionOptionsFactory: SessionOptionsHelper.CreateDirectMlOptions);

Supported Voices

PersonaPlex includes pre-packaged voice embeddings:

Category Voices
Natural (Female) NATF0, NATF1, NATF2, NATF3
Natural (Male) NATM0, NATM1, NATM2, NATM3
Variety (Female) VARF0, VARF1, VARF2, VARF3, VARF4
Variety (Male) VARM0, VARM1, VARM2, VARM3, VARM4

Real-Time Conversation Pipeline

For real-time audio conversations (VAD → STT → LLM → TTS), see the companion library:

👉 ElBruno.Realtime — Pluggable real-time audio conversation framework for .NET, following Microsoft.Extensions.AI patterns. Includes Whisper STT, QwenTTS, Silero VAD, and Blazor + Aspire samples.

Samples

See the Samples Guide for detailed instructions on each scenario, including what test content to use and expected output.

Sample Description
scenario-01-simple Basic speech-to-speech generation
scenario-02-persona Custom persona prompts
scenario-03-voice-select Voice selection demo
scenario-04-model-download Model download, progress reporting & custom directory

Run a Sample

cd src/samples/scenario-01-simple
dotnet run -- myrecording.wav

Documentation

Document Description
Getting Started Setup, auto-download, and first run
Samples Guide Detailed guide for each sample scenario
Architecture Pipeline design, model components, project structure
Exporting Models Re-exporting ONNX models from PyTorch weights
GPU Acceleration CUDA, DirectML, and CPU configuration
Publishing NuGet publishing guide (Trusted Publishing / OIDC)

Python Tools

The python/ directory contains tools for exporting ONNX models from PyTorch weights. These are only needed if you want to re-export or customize models — they are not required for running the C# pipeline.

Exported ONNX Models

Model Size Description
mimi_encoder.onnx 178 MB Audio → discrete tokens (Mimi audio codec encoder)
mimi_decoder.onnx 170 MB Discrete tokens → audio (Mimi audio codec decoder)
lm_backbone.onnx + .data 13.3 GB (FP16) Full 7B-param Transformer backbone (32 attention layers, 4096 dim)

The Mimi encoder/decoder models are hosted on HuggingFace and auto-downloaded by the C# library.

The LM backbone (7B parameters) can be exported locally using:

cd python
pip install -r requirements.txt
python export_onnx.py --component lm --output onnx_exports/ --moshi-path /path/to/personaplex/moshi --quantize fp16

Note: The onnxruntime-genai model builder does NOT support the PersonaPlex/Moshi architecture (it's not a standard HuggingFace model type). The manual export via export_onnx.py works and produces a validated, loadable ONNX model. FP16 inference on CPU takes ~0.4s per step with ~25s model load time.


Building from Source

git clone https://github.com/elbruno/ElBruno.PersonaPlex.git
cd ElBruno.PersonaPlex
dotnet build
dotnet test

Requirements

  • .NET 8.0 or .NET 10.0 SDK
  • ONNX Runtime compatible platform (Windows, Linux, macOS)
  • Sufficient disk space for model files

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Create a branch for your feature or fix: git checkout -b feature/my-feature
  3. Make your changes and ensure the solution builds: dotnet build
  4. Run tests: dotnet test
  5. Submit a pull request with a clear description of the changes

Please open an issue first for major changes or new features to discuss the approach.


References


👋 About the Author

Hi! I'm ElBruno 🧡, a passionate developer and content creator exploring AI, .NET, and modern development practices.

Made with ❤️ by ElBruno

If you like this project, consider following my work across platforms:

  • 📻 Podcast: No Tienen Nombre — Spanish-language episodes on AI, development, and tech culture
  • 💻 Blog: ElBruno.com — Deep dives on embeddings, RAG, .NET, and local AI
  • 📺 YouTube: youtube.com/elbruno — Demos, tutorials, and live coding
  • 🔗 LinkedIn: @elbruno — Professional updates and insights
  • 𝕏 Twitter: @elbruno — Quick tips, releases, and tech news

License

This project is licensed under the MIT License — see the LICENSE file for details.

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 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 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.6.0 116 2/28/2026
0.5.2 87 2/27/2026
0.5.1-preview 93 2/27/2026