Skip to main content
net10.0

Local text-to-speech synthesis using VITS/Piper models with ONNX Runtime. Run TTS locally without cloud APIs or network dependencies.

Published
Sep 30, 2026
19d ago
Total Downloads
18.2K
18,217

Install

dotnet add package LMSupply.Synthesizer --version 0.97.0
ProductVersions
.NET
net10.0

README

LMSupply.Synthesizer

Local text-to-speech synthesis using VITS/Piper models.

Known issue — the output is not yet intelligible speech. The synthesizer has no text-to-phoneme step: it maps letters to fixed ids instead of the phoneme ids the Piper voices were trained on, so what comes out is voice-like noise (a Whisper transcript of "The weather is beautiful today." read back "tube of warrior practitioner"), and text in non-Latin scripts comes out as near-silence.

Features

  • Zero-config: Models download automatically from HuggingFace
  • GPU Acceleration: CUDA, DirectML (Windows), CoreML (macOS)
  • Licensing stated per voice: Piper's code is MIT; each voice's own license is in SynthesizerModelInfo.License (the default voice is public domain)
  • Multiple Languages: English, Korean, Japanese, Chinese, and more

Quick Start

using LMSupply.Synthesizer;

#pragma warning disable LMSUPPLY001 // the output is not yet intelligible speech — see the repository README's known issue
// Load the default model
await using var synthesizer = await LocalSynthesizer.LoadAsync("default");

// Synthesize speech
var result = await synthesizer.SynthesizeAsync("Hello, welcome to LMSupply!");

Console.WriteLine($"Duration: {result.DurationSeconds:F2}s");
Console.WriteLine($"Real-time factor: {result.RealTimeFactor:F1}x");

// Save as WAV file
await synthesizer.SynthesizeToFileAsync("Hello world!", "output.wav");

Available Models

Alias Voice Language Description
default LJSpeech en-US Female (public domain)
lessac Lessac en-US High-quality female
fast Ryan en-US Fast male voice
quality Amy en-US High-quality female
british Semaine en-GB British female
korean KSS ko-KR Korean female
chinese Huayan zh-CN Mandarin female

GPU Acceleration

# NVIDIA GPU
dotnet add package Microsoft.ML.OnnxRuntime.Gpu

# Windows (AMD/Intel/NVIDIA)
dotnet add package Microsoft.ML.OnnxRuntime.DirectML

Changes from Previous Version

No structural changes between v0.96.0 and v0.97.0.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.