| Guide | Contents |
|---|---|
| Getting started | Prerequisites, model layout, restore, build, and first validation |
| Architecture | Project boundaries, pipeline flow, messages, events, cancellation, and lifecycle |
| Core reference | Queues, handlers, conversation state, realtime contracts, and configuration |
| LLM reference | Chat Completions, streaming, prompts, output processing, compaction, and tools |
| Audio reference | Silero VAD, Whisper STT, Kokoro TTS, remote TTS, formats, and native dependencies |
| Voice loop sample | End-to-end microphone sample, options, output, shutdown, and troubleshooting |
| Development and testing | Solution layout, smoke harness, extension points, conventions, and diagnostics |
The solution targets .NET 9 and contains five libraries, one interactive sample, and one executable smoke-test harness.
| Project | Role |
|---|---|
SpeechToSpeech.Core |
Pipeline contracts, queues, conversation state, realtime session models, cancellation, and utilities |
SpeechToSpeech.Vad |
Streaming Silero voice activity detection |
SpeechToSpeech.Stt |
Local Whisper ONNX transcription |
SpeechToSpeech.Llm |
OpenAI-compatible Chat Completions and LLM output routing |
SpeechToSpeech.Tts |
Local Kokoro and OpenAI-compatible speech synthesis |
VoiceLoopDemo |
NAudio microphone-to-speaker demonstration |
SpeechToSpeech.Tests |
xUnit unit and regression tests |
The C# solution is a library and local sample implementation. Types for realtime sessions and transports exist in Core so a host can be built around the pipeline.
From the repository root:
dotnet restore .\SpeechToSpeech.sln
dotnet build .\SpeechToSpeech.sln --configuration Release
dotnet test .\SpeechToSpeech.sln --configuration ReleaseRun the interactive sample from the repository root so its default models/... paths resolve correctly:
dotnet run --project .\samples\VoiceLoopDemo\VoiceLoopDemo.csproj -- `
--llm-url http://127.0.0.1:39839/v1 `
--model qwen2.5-1.5b-instruct-openvino-npu:5 `
--verboseThe documented test profile uses Foundry Local CLI with qwen2.5-1.5b-instruct-openvino-npu:5 on an Intel NPU. See Getting started before running the sample because it also requires .NET 9, model files, Foundry Local, compatible Intel NPU drivers, and Windows audio input/output.