powershell-speech-service/ttsf.ps1
2024-07-12 22:33:03 -04:00

11 lines
307 B
PowerShell

param([string]$outputPath, [string]$inputPath)
echo $inputPath
$txt = Get-Content $inputPath
Add-Type -AssemblyName System.Speech
$synth = New-Object System.Speech.Synthesis.SpeechSynthesizer
$synth.SetOutputToWaveFile($outputPath)
$synth.Speak($txt)
echo "sleeping so you can read :)"
sleep 10;