The SpVoice object brings the text-to-speech (TTS) engine capabilities to applications using SAPI automation. An application can create numerous SpVoice objects, each independent of and capable of interacting with the others. An SpVoice object, usually referred to simply as a voice, is created with default property settings so that it is ready to speak immediately.
1 2 3 |
$sam = New-Object -comObject SAPI.SpVoice [xml]$doc = (New-Object System.Net.WebClient).DownloadString('https://news.google.es/news?pz=1&cf=all&ned=es&hl=es&output=rss') $doc.rss.channel.Item | %{$sam.Speak($_.title)} |