TextToVoice.Core
0.1.0-alpha.0.16
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
<PackageReference Include="TextToVoice.Core" Version="0.1.0-alpha.0.16" />
<PackageVersion Include="TextToVoice.Core" Version="0.1.0-alpha.0.16" />
<PackageReference Include="TextToVoice.Core" />
paket add TextToVoice.Core --version 0.1.0-alpha.0.16
#r "nuget: TextToVoice.Core, 0.1.0-alpha.0.16"
#:package TextToVoice.Core@0.1.0-alpha.0.16
#addin nuget:?package=TextToVoice.Core&version=0.1.0-alpha.0.16&prerelease
#tool nuget:?package=TextToVoice.Core&version=0.1.0-alpha.0.16&prerelease
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
| Product | Versions 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. |
-
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 |