1 2 3 4 5 6 7 8 9 10 |
Add-Type -AssemblyName System.Speech $synthesizer = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer $synthesizer.SelectVoice("Microsoft Zira Desktop") $synthesizer.Rate=0 $json=Invoke-WebRequest -Uri 'https://en.wikipedia.org/w/api.php?action=parse&format=json&prop=text&page=PowerShell' | ConvertFrom-JSON $json.parse.text.'*' -replace "<.*?>" | %{ $synthesizer.Speak($_) } |