En uno de los ordenadores (el que emite los mensajes) ejecutamos el siguiente script en PowerShell (leer el texto contenido dentro de un fichero mediante la voz del Sistema Operativo):
1 2 3 4 5 6 7 8 9 10 |
#Leer el texto contenido dentro de un fichero mediante la voz del Sistema Operativo Add-Type -AssemblyName System.Speech gc E:\aleer\fichero.txt | %{ $synthesizer = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer $_ #Establece la velocidad de habla de la SpeechSynthesizer $synthesizer.Rate=0 $synthesizer.Speak($_) } |
En el otro ordenador (el que recibe los mensajes) ejecutamos el siguiente script en PowerShell (convertir la entrada de micrófono a texto):
1 2 3 4 5 6 7 8 9 |
[void][reflection.assembly]::loadwithpartialname('system.speech') $rec = New-Object 'System.Speech.Recognition.SpeechRecognitionEngine' $rec.LoadGrammar((New-Object 'System.Speech.Recognition.DictationGrammar')) $rec.SetInputToDefaultAudioDevice() do { $rec.Recognize().Text | Out-File e:\wavtext.txt -Append }while(1) |