diff --git a/SpeechMod/Voice/WindowsSpeech.cs b/SpeechMod/Voice/WindowsSpeech.cs index 4746891..a9767ab 100644 --- a/SpeechMod/Voice/WindowsSpeech.cs +++ b/SpeechMod/Voice/WindowsSpeech.cs @@ -78,7 +78,11 @@ private string FormatGenderSpecificVoices(string text) private void SpeakInternal(string text, float delay = 0f) { - text = SpeakBegin + text + SpeakEnd; + // Send raw SAPI XML (a "" fragment) as-is. Do NOT wrap it in a W3C + // document: that wrapper makes SAPI + // ignore the proprietary selection (so it falls back to the + // system default voice) and makes neural engines such as NaturalVoiceSAPIAdapter reject + // the markup with SPERR_UNSUPPORTED_FORMAT (0x80045003) -> no audio. if (Main.Settings?.LogVoicedLines == true) Debug.Log(text); WindowsVoiceUnity.Speak(text, Length(text), delay);