Skip to content

Instantly share code, notes, and snippets.

@philipmat
Last active December 9, 2018 00:51
Show Gist options
  • Save philipmat/921b71535025dcf0da333a2628012084 to your computer and use it in GitHub Desktop.
Save philipmat/921b71535025dcf0da333a2628012084 to your computer and use it in GitHub Desktop.
say command in Powershell
[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