1 2 3 4 5 6 7 8 9 |
Add-Type -AssemblyName System.Speech gc .\palabras.txt | %{ $synthesizer = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer $path = "E:\"+$_+".mp3" $synthesizer.SetOutputToWaveFile($path) $synthesizer.Speak($_) $synthesizer.SetOutputToDefaultAudioDevice() } |