Skip to content

Instantly share code, notes, and snippets.

Created February 12, 2013 02:10
What would you like to do?
Speech In PowerShell using Windows Speech API COM object
function Out-Speech($text) {
$speechy = New-Object –ComObject SAPI.SPVoice;
$voices = $speechy.GetVoices();
foreach ($voice in $voices) {
$speechy.Voice = $voice;
Out-Speech("Testing, One, Two, Three");
#Out-Speech("Eye m gunna ki ick yur ice, you sum bee itch!");
#Out-Speech("Oh no you dih-int.")
#Out-Speech("Ahsk naught wot yawr con tree con dew far you, ahsk wot yew con dew far yawr con tree")
#Out-SPeech("Eets a ME, Ah Mahd Eo")
#Out-Speech("Oh, dear! My bum is itching most terribly! I must scoot around on the rug to scratch it! Oh yes! That is SPLENDID!")
#Out-Speech("Turn left, in 100 feet and plow into that bus full of nuns.")
#Out-Speech("Accelerate up ramp and leap over all those stupid buses Evil K-neivel!")
#Out-Speech("In 100 feet you will die in a fiery explosion of death and molten car parts. So says the Oracle Of The Dashboard!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment