Skip to content

Instantly share code, notes, and snippets.

@gfoss
Created May 25, 2017 04:48
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gfoss/7b0368bc300e1b4683d090501f7ab6bc to your computer and use it in GitHub Desktop.
Save gfoss/7b0368bc300e1b4683d090501f7ab6bc to your computer and use it in GitHub Desktop.
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")
}
@ankappatd
Copy link

This is cool!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment