El objeto SpVoice permite reproducir cualquier texto mediante ondas de voz por parte del Sistema Operativo.
More information
https://msdn.microsoft.com/en-us/library/ms720151(v=vs.85).aspx#API_for_Text-To-Speech
Opción 1
1 2 3 |
$sam = New-Object -comObject SAPI.SpVoice [xml]$doc=Invoke-WebRequest 'https://news.google.es/news?pz=1&cf=all&ned=es&hl=es&output=rss' $doc.rss.channel.Item | %{$sam.Speak($_.title)} |
Opción 2
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)} |