Text to Speech in PowerShell With System.Speech
Read text aloud using a managed .NET speech synthesizer.
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
!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 ClassEvidence: Documents Speak, voice selection and SSML output.
Last verified: 2026-09-20 · Category: Media
06Related solutions
Grep on Windows: Select-String
Search inside text files and logs with regex, returning file, line number and match.
Zip Files with Compress-Archive
Create or update a .zip from any files or folder contents straight from PowerShell.
Test a TCP port connection on Windows with Test-NetConnection
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.