Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Say-Text {
- param ([Parameter(Mandatory=$true, ValueFromPipeline=$true)] [string] $Text)
- [Reflection.Assembly]::LoadWithPartialName('System.Speech') | Out-Null
- $object = New-Object System.Speech.Synthesis.SpeechSynthesizer
- $object.Speak($Text)
- }
- Say-Text "Hello World"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement