Skip to content

Instantly share code, notes, and snippets.

@ankappatd
ankappatd / say.ps1
Created Apr 20, 2020 — forked from gfoss/say.ps1
PowerShell Say
View say.ps1
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")
}