Graphene.AIOffice.VoiceAgent 1.26.9.3

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

AIOffice.VoiceAgent

Cross-platform voice agent executable for AIOffice: speech-to-text via whisper.net and text-to-speech via KokoroSharp.

  • Recognition: whisper.net (CPU, ggml models). Primary engine on Linux/macOS, automatic fallback on Windows when the WinRT agent (AIOffice.VoiceAgent.Win) fails.
  • Microphone: NAudio on Windows, arecord subprocess on Linux (alsa-utils, auto-installed via apt-get when missing).
  • TTS: Kokoro neural voices (managed phonemization, no native espeak). Reuses the kokoro.onnx model asset shipped by the app when present, otherwise downloads it once.
  • Dependencies: verified and installed automatically at startup — whisper ggml model download (Hugging Face), arecord/libstdc++6 via apt on Linux, VC++ Redistributable on Windows. The user does nothing.

Architecture (shared base)

This agent hosts VoiceAgentBase — the single implementation of the JSON-Lines protocol loop, logging, the unified speak logic and the render path, inherited by BOTH voice agents via C# inheritance (no duplicated code):

  • VoiceAgentCross (this executable) — whisper STT; used standalone and by the SIP bridge (--pipe-audio + render).
  • VoiceAgentWin (AIOffice.VoiceAgent.Win executable) — WinRT STT + SAPI fallback; driven by the AIOffice Voice panel.

Platform parts plug in through hooks: CreateRecognizer(), TrySpeakOsFallback(), CreateAudioSink(), InitializeTtsAsync()/ReadyPayload().

TTS delivery: Kokoro supports incremental synthesis — KokoroTts.StreamToSinkAsync renders sentence by sentence into ONE continuous sink (IAudioSink: NAudio on Windows, aplay/paplay stdin on Linux/macOS) → first sound as soon as the first sentence is ready, zero gaps. The end-of-turn signal (("", isLast=true)) drains the tail and resumes recognition. Engines without streaming (SAPI) keep the parked file-based path, used only as the OS fallback.

Protocol

JSON Lines over stdin/stdout:

stdin:  {"cmd":"start","lang":"<iso2>"}            — begin recognition (mic capture)
        {"cmd":"audio","b64":"<pcm16-16k>"}        — external PCM chunk (--pipe-audio mode)
        {"cmd":"speak","text":"...","lang":"<iso2>","streaming":true|false}
        {"cmd":"speak","text":"...","lang":"<iso2>","render":true}   — render PCM, no playback
        {"cmd":"stop"}
stdout: {"type":"ready"} | {"type":"transcript","text"} | {"type":"audio","b64":"...","rate":24000}
        | {"type":"status","text"} | {"type":"done"} | {"type":"error","text"}
  • --pipe-audio: no microphone; audio arrives via {"cmd":"audio"} (16 kHz mono PCM16, base64). Used by the AgentBridge SIP medium — VAD + whisper stay here (media = I/O only).
  • --no-system-libs: skip the Windows SAPI TTS fallback — the chain runs exactly as on Linux (whisper + Kokoro only). Test switch.
  • render:true on speak: synthesize to 24 kHz PCM (Kokoro primary → SAPI fallback on Windows) and push it as {"type":"audio"} chunks instead of playing it back.
  • streaming:true on speak: render the chunk to the continuous audio sink (device playback, no gaps); the trailing speak with empty text closes the stream and resumes recognition.

Usage

AIOffice.VoiceAgent [--check] [--debug] [--tts-method fast|full] [--pipe-audio] [--no-system-libs]
  • --check — verify/install all dependencies, load the whisper model and exit (used by CI and to pre-warm).
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 Graphene.AIOffice.VoiceAgent:

Package Downloads
Graphene.AIOffice.VoiceAgent.Win

Voice agent executable (Windows only). WinRT offline speech recognition + KokoroSharp neural TTS.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.26.9.3 98 9/3/2026