Last active
December 9, 2018 00:51
-
-
Save philipmat/921b71535025dcf0da333a2628012084 to your computer and use it in GitHub Desktop.
say command in Powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[cmdletbinding()] | |
param( | |
[Parameter(Position = 1, Mandatory = $true)] | |
[String] | |
$message | |
) | |
Add-Type -AssemblyName System.Speech | |
$synth = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer | |
$synth.Speak($message) | |
# Usage: say.ps1 'Hello there' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment