Text to Speech in PowerShell With System.Speech

Read text aloud using a managed .NET speech synthesizer.

WindowsaudiottspowershellLow risk
Run Add-Type -AssemblyName System.Speech then Speak("your text") to hear it spoken.

01Command

Command
$ Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak("Hello from PowerShell")

02What it does

The System.Speech.Synthesis.SpeechSynthesizer class exposes Windows voices to .NET. Load the assembly, create an instance and call Speak. You can list voices with GetInstalledVoices and set a voice before speaking, which doubles as an accessibility aid.

03Risk

RiskLow risk
RequirementsWindows 10/11 with PowerShell 5.1 or PowerShell 7+
!Warning: Some PowerShell hosts block Add-Type or have restricted policy; run in a normal console session if it fails.

04Undo

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

05Sources

  • SpeechSynthesizer Class
    Microsoft Learn · vendor-doc · 2026-09-20
    Evidence: Documents Speak, voice selection and SSML output.

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

06Related solutions