Shiny.Speech
1.2.0
Prefix Reserved
See the version list below for details.
dotnet add package Shiny.Speech --version 1.2.0
NuGet\Install-Package Shiny.Speech -Version 1.2.0
<PackageReference Include="Shiny.Speech" Version="1.2.0" />
<PackageVersion Include="Shiny.Speech" Version="1.2.0" />
<PackageReference Include="Shiny.Speech" />
paket add Shiny.Speech --version 1.2.0
#r "nuget: Shiny.Speech, 1.2.0"
#:package Shiny.Speech@1.2.0
#addin nuget:?package=Shiny.Speech&version=1.2.0
#tool nuget:?package=Shiny.Speech&version=1.2.0
Shiny.Speech
Cross-platform speech services for .NET MAUI and Blazor WebAssembly — speech-to-text, text-to-speech, audio capture, and audio playback with pluggable cloud providers.
Libraries
| Package | Description | Targets |
|---|---|---|
| Shiny.Speech | Core interfaces + native platform implementations (STT, TTS, audio capture, audio playback) | net10.0-ios, net10.0-android, net10.0-windows, net10.0 (Browser/WASM) |
| Shiny.Speech.Cloud | Cloud provider abstractions + CloudSpeechToText / CloudTextToSpeech implementations |
net10.0 |
| Shiny.Speech.Azure | Azure AI Speech provider (STT + TTS) | net10.0 |
| Shiny.Speech.ElevenLabs | ElevenLabs provider (TTS) | net10.0 |
Getting Started
Native Platform Speech
Use the built-in OS speech engines — no cloud account needed. Works on MAUI (iOS, Android, Windows) and Blazor WebAssembly (via Web Speech API).
builder.Services.AddSpeechServices();
// Registers: ISpeechToTextService, ITextToSpeechService, IAudioSource, IAudioPlayer
// On Browser/WASM: auto-detected via OperatingSystem.IsBrowser()
Azure AI Speech (Cloud)
builder.Services.AddAzureSpeech("your-subscription-key", "your-region");
ElevenLabs TTS (Cloud)
builder.Services.AddElevenLabsTextToSpeech("your-api-key");
Usage
Text-to-Speech
public class MyService(ITextToSpeechService tts)
{
public async Task SpeakAsync()
{
await tts.SpeakAsync("Hello world!", new TextToSpeechOptions
{
SpeechRate = 1.2f,
Pitch = 1.0f,
Volume = 0.8f
});
}
}
Speech-to-Text
public class MyService(ISpeechToTextService stt)
{
public async Task ListenAsync(CancellationToken ct)
{
var access = await stt.RequestAccess();
if (access != AccessState.Available)
return;
// Check if already listening
if (stt.IsListening)
return;
// Simple: wait for silence
var text = await stt.ListenUntilSilence(cancellationToken: ct);
// Streaming: get partial results
await foreach (var result in stt.ContinuousRecognize(cancellationToken: ct))
{
Console.WriteLine($"[{(result.IsFinal ? "FINAL" : "partial")}] {result.Text}");
if (result.IsFinal)
break;
}
}
}
Wake Word Listening
// "Hey Siri" style — listens continuously until wake phrase is detected,
// then captures everything spoken after it until silence
var command = await stt.ListenWithWakeWord("Hey Computer", cancellationToken: ct);
// User says: "Hey Computer, what's the weather" → returns "what's the weather"
// User says: "Hey Computer" [pause] "what's the weather" → returns "what's the weather"
Keyword Listening
// Listens until one of the specified keywords is detected
var answer = await stt.ListenForKeyword(["Yes", "No", "Maybe"], cancellationToken: ct);
// User says: "I think yes" → returns "Yes"
Custom Cloud Provider
Implement ISpeechToTextProvider and/or ITextToSpeechProvider from Shiny.Speech.Cloud:
public class MyCloudSttProvider : ISpeechToTextProvider
{
public async IAsyncEnumerable<SpeechRecognitionResult> RecognizeAsync(
Stream audioStream,
SpeechRecognitionOptions? options = null,
CancellationToken cancellationToken = default)
{
// Read PCM audio from audioStream (16kHz, 16-bit, mono)
// Yield recognition results...
}
}
// Register:
builder.Services.AddCloudSpeechToText<MyCloudSttProvider>();
Platform Requirements
| Platform | STT | TTS | Audio Capture | Audio Playback |
|---|---|---|---|---|
| iOS 15+ | SFSpeechRecognizer | AVSpeechSynthesizer | AVAudioEngine | AVAudioPlayer |
| Android 26+ | SpeechRecognizer | Android TTS | AudioRecord | MediaPlayer |
| Windows 10 19041+ | Windows.Media.SpeechRecognition | Windows.Media.SpeechSynthesis | AudioGraph | MediaPlayer |
| Browser (WASM) | Web Speech API (SpeechRecognition) |
Web Speech API (SpeechSynthesis) |
Web Audio API (getUserMedia + ScriptProcessorNode) |
HTML5 Audio |
Browser (Blazor WebAssembly)
No manifest changes needed — the browser prompts the user for microphone access automatically. Include the JS interop module in your index.html:
<script src="shiny-speech.js"></script>
Note:
IAudioSourcecaptures raw PCM audio in the browser using the Web Audio API (getUserMedia+ScriptProcessorNode), downsampled to 16kHz 16-bit mono. Audio playback (IAudioPlayer) accepts any browser-supported format via a base64 data URL.
iOS/macOS
Add to Info.plist:
<key>NSSpeechRecognitionUsageDescription</key>
<string>Speech recognition description</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone description</string>
Android
Add to AndroidManifest.xml:
<uses-permission android:name="android.permission.RECORD_AUDIO" />
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-android36.0 is compatible. net10.0-browser was computed. net10.0-ios was computed. net10.0-ios26.0 is compatible. net10.0-maccatalyst was computed. net10.0-maccatalyst26.0 is compatible. net10.0-macos was computed. net10.0-macos26.0 is compatible. net10.0-tvos was computed. net10.0-windows was computed. net10.0-windows10.0.19041 is compatible. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
-
net10.0-android36.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Xamarin.AndroidX.Core (>= 1.18.0)
- Xamarin.AndroidX.Fragment (>= 1.8.8.1)
-
net10.0-ios26.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
-
net10.0-maccatalyst26.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
-
net10.0-macos26.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
-
net10.0-windows10.0.19041
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Shiny.Speech:
| Package | Downloads |
|---|---|
|
Shiny.Speech.Cloud
Shiny Speech - Cross-platform speech-to-text and text-to-speech for .NET MAUI |
|
|
Shiny.Maui.Controls.SpeechAddins
Shiny Controls for Blazor and .NET MAUI - Makes your UI shine beautifully with complex controls for free |
|
|
Shiny.Blazor.Controls.SpeechAddins
Shiny Controls for Blazor and .NET MAUI - Makes your UI shine beautifully with complex controls for free |
|
|
Shiny.AiConversation
Shiny AI Conversation - Voice chat with your AI in your .NET apps |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-beta-0030 | 132 | 8/15/2026 |
| 3.0.0-beta-0029 | 159 | 8/8/2026 |
| 3.0.0-beta-0028 | 160 | 8/7/2026 |
| 3.0.0-beta-0027 | 157 | 8/5/2026 |
| 3.0.0-beta-0026 | 157 | 8/5/2026 |
| 3.0.0-beta-0024 | 160 | 8/5/2026 |
| 3.0.0-beta-0023 | 165 | 8/5/2026 |
| 3.0.0-beta-0022 | 188 | 8/2/2026 |
| 3.0.0-beta-0021 | 179 | 7/31/2026 |
| 3.0.0-beta-0020 | 169 | 7/30/2026 |
| 3.0.0-beta-0019 | 167 | 7/30/2026 |
| 3.0.0-beta-0018 | 195 | 7/27/2026 |
| 3.0.0-beta-0017 | 167 | 7/26/2026 |
| 3.0.0-beta-0016 | 175 | 7/24/2026 |
| 3.0.0-beta-0015 | 167 | 7/23/2026 |
| 3.0.0-beta-0014 | 207 | 7/11/2026 |
| 3.0.0-beta-0013 | 183 | 7/10/2026 |
| 3.0.0-beta-0012 | 174 | 7/9/2026 |
| 2.1.0 | 1,470 | 5/22/2026 |
| 1.2.0 | 376 | 5/6/2026 |