Text-to-speech in PowerShell with System.Speech

No third-party tools needed: .NET's SpeechSynthesizer speaks any text through your speakers — useful for audible script notifications.

WindowsttsmediapowershellLow risk
Run `Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('your text')` to hear it spoken.

01Command

Command
$ Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('Backup finished successfully.')

02What it does

System.Speech ships with .NET Framework, so every Windows PowerShell installation already has it; Add-Type just loads the assembly into the session. Beyond Speak(), the synthesizer supports SpeakAsync for non-blocking output, SetOutputToWaveFile to render the speech to a WAV file, and SelectVoice to pick an installed voice. Note the newer .NET (Core) 'PowerShell 7' uses a different assembly (System.Speech is Windows-only), so this is most reliable in the built-in Windows PowerShell 5.1.

03Risk

RiskLow risk
RequirementsWorks in Windows PowerShell 5.1; voices installed with Windows (e.g. Microsoft Zira/David) are used automatically.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • SpeechSynthesizer Class | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents System.Speech.Synthesis.SpeechSynthesizer and its Speak method for text-to-speech synthesis in .NET.

Last verified: 2026-09-17 · Category: Media

06Related solutions