You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ff5cafb
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Add resilient TTS fallback and readiness status (#806)
* Add TTS provider fallback and tts.status readiness command
When the requested/configured TTS provider isn't usable (no ElevenLabs key,
Piper voice not downloaded), gracefully fall back to Windows TTS instead of
throwing, and report the effective vs requested provider plus a fellBack flag.
A stale configured Windows voice now degrades to the system default voice so
the fallback always speaks.
Add a tts.status node command that reports per-provider readiness
(ready/needs-api-key/needs-voice/voice-not-downloaded/unavailable) plus the
configured/effective provider and willFallBack. PII-free. Wired across
DangerousCommands gating, MCP descriptions, skill.md, and the setup allowlist
export. Fix a stale pre-GA SHA-256 TODO docstring in PiperVoiceManager
(verification is already implemented and enforced by AssetHashPinningTests).
Co-authored-by: Copilot <[email protected]>
* Preserve configured TTS fallback for chat playback
Leave chat playback provider unset so TextToSpeechService can distinguish configured/default playback from explicit provider requests and apply the new Windows fallback when the configured provider is unavailable.
Co-authored-by: Copilot <[email protected]>
---------
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Scott Hanselman <[email protected]>
/// The provider that was originally requested/configured before any
224
+
/// fallback. Equals <see cref="Provider"/> when no fallback occurred.
225
+
/// Null is treated as "same as Provider" by the response surface.
226
+
/// </summary>
227
+
publicstring?RequestedProvider{get;set;}
228
+
229
+
/// <summary>
230
+
/// True when the requested/configured provider was not usable and the
231
+
/// service fell back to another provider (Windows) to serve the call.
232
+
/// </summary>
233
+
publicboolFellBack{get;set;}
234
+
117
235
publicstring?ContentType{get;set;}
118
236
publicint?DurationMs{get;set;}
119
237
}
238
+
239
+
/// <summary>
240
+
/// Result of <see cref="TtsCapability.ResolveEffectiveProvider"/>: the
241
+
/// provider originally preferred and the one that should actually serve the
242
+
/// call after fallback.
243
+
/// </summary>
244
+
/// <param name="RequestedProvider">The resolved requested/configured provider before fallback.</param>
245
+
/// <param name="EffectiveProvider">The provider that should serve the call.</param>
246
+
/// <param name="FellBack">True when <paramref name="EffectiveProvider"/> differs from <paramref name="RequestedProvider"/> because the latter wasn't usable.</param>
247
+
publicreadonlyrecordstructTtsProviderResolution(
248
+
stringRequestedProvider,
249
+
stringEffectiveProvider,
250
+
boolFellBack);
251
+
252
+
/// <summary>Per-provider readiness snapshot (PII-free) for <c>tts.status</c>.</summary>
253
+
publicsealedclassTtsProviderStatus
254
+
{
255
+
publicstringProvider{get;set;}="";
256
+
/// <summary>
257
+
/// One of <see cref="TtsCapability.ReadinessReady"/>,
"Speak text aloud on the Windows node. Args: text (string, required), provider ('piper'|'windows'|'elevenlabs', optional — falls back to the configured TtsProvider setting, default 'piper' for fresh installs), voiceId (string, optional — overrides the per-provider configured voice), model (string, optional, ElevenLabs only), interrupt (bool, default false — interrupts any in-progress playback). Returns { spoken, provider, contentType, durationMs }.",
250
+
"Speak text aloud on the Windows node. Args: text (string, required), provider ('piper'|'windows'|'elevenlabs', optional — omit to use the configured TtsProvider setting, default 'piper' for fresh installs), voiceId (string, optional — overrides the per-provider configured voice), model (string, optional, ElevenLabs only), interrupt (bool, default false — interrupts any in-progress playback). When provider is omitted and the configured provider isn't usable (no ElevenLabs key, Piper voice not downloaded), the node falls back to Windows TTS so playback still happens. Explicit provider requests stay strict and do not silently reroute. Returns { spoken, provider (the provider that actually spoke), requestedProvider, fellBack, contentType, durationMs }.",
251
+
["tts.status"]=
252
+
"Report TTS provider readiness. No args. Returns { configuredProvider, effectiveProvider (the provider that would run now after fallback), willFallBack (bool), providers: [{ provider ('piper'|'windows'|'elevenlabs'), readiness ('ready'|'needs-api-key'|'needs-voice'|'voice-not-downloaded'|'unavailable'), isReady (bool) }] }. Carries no PII (no voice ids, no key fragments, no device names). Requires NodeTtsEnabled.",
0 commit comments