Skip to content

Instantly share code, notes, and snippets.

@gfoss
gfoss / say.ps1
Created May 25, 2017 04:48
PowerShell Say
function say {
param( [string]$comment = $_ )
[Reflection.Assembly]::LoadWithPartialName('System.Speech') | Out-Null
$object = New-Object System.Speech.Synthesis.SpeechSynthesizer
$object.SelectVoiceByHints('Female')
$object.Speak("$comment")
}