TextToVoice.Core 0.1.0-alpha.0.16

This is a prerelease version of TextToVoice.Core.
There is a newer version of this package available.
See the version list below for details.
dotnet add package TextToVoice.Core --version 0.1.0-alpha.0.16
                    
NuGet\Install-Package TextToVoice.Core -Version 0.1.0-alpha.0.16
                    
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="TextToVoice.Core" Version="0.1.0-alpha.0.16" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TextToVoice.Core" Version="0.1.0-alpha.0.16" />
                    
Directory.Packages.props
<PackageReference Include="TextToVoice.Core" />
                    
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 TextToVoice.Core --version 0.1.0-alpha.0.16
                    
#r "nuget: TextToVoice.Core, 0.1.0-alpha.0.16"
                    
#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 TextToVoice.Core@0.1.0-alpha.0.16
                    
#: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=TextToVoice.Core&version=0.1.0-alpha.0.16&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TextToVoice.Core&version=0.1.0-alpha.0.16&prerelease
                    
Install as a Cake Tool

TextToVoice.Core

Interface-based TTS abstraction for .NET. Provides ITtsEngine, SSML detection/preprocessing, and audio utilities — with zero dependencies.

Installation

dotnet add package TextToVoice.Core

Quick Start

TextToVoice.Core defines the interfaces and shared types. Install an engine package to get actual TTS functionality:

Package Engine Platform
TextToVoice.Engines.Windows System.Speech (SAPI) Windows
TextToVoice.Engines.Piper Piper neural TTS Cross-platform
TextToVoice.Engines.SherpaOnnx Embedded ONNX inference Cross-platform
TextToVoice.Engines.ElevenLabs ElevenLabs cloud API Any (requires API key)

Core Interfaces

// ITtsEngine — main abstraction
using TextToVoice.Core;

ITtsEngine engine = /* create from an engine package */;

await engine.SpeakAsync("Hello world");
byte[] wav = await engine.SynthesizeToAudioAsync("Hello");
await engine.SaveToFileAsync("Hello", "output.wav");

engine.SetRate(3);     // -10 (slowest) to 10 (fastest)
engine.SetVolume(80);  // 0 (silent) to 100 (loudest)
// ISsmlCapable — SSML support (optional per engine)
if (engine is ISsmlCapable ssml)
{
    await ssml.SpeakSsmlAsync("<speak>Hello <break time='500ms'/> world</speak>");
}
// SSML detection and preprocessing
bool isSsml = SsmlDetector.IsSsml("<speak>Hello</speak>"); // true
string wrapped = SsmlDetector.WrapInSsml("Hello");          // adds <speak> tags

var preprocessor = new SsmlPreprocessor();
var result = preprocessor.Preprocess("<speak><prosody rate='fast'>Hello</prosody></speak>");
// result.PlainText = "Hello", result.RateMultiplier = 1.5

License

MIT

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.
  • net10.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on TextToVoice.Core:

Package Downloads
TextToVoice.Engines.Windows

Windows SAPI (System.Speech) engine for TextToVoice. Native SSML support with automatic namespace normalization.

TextToVoice.Engines.SherpaOnnx

SherpaOnnx engine for TextToVoice. Embedded ONNX inference for cross-platform offline synthesis with no external processes.

TextToVoice.Engines.ElevenLabs

ElevenLabs engine for TextToVoice. High-quality cloud-based TTS via the ElevenLabs REST API.

TextToVoice.Engines.Piper

Piper TTS engine for TextToVoice. Cross-platform offline synthesis via the Piper executable.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 136 3/13/2026
0.1.0-alpha.0.16 51 3/14/2026