I need to use wsl to invoke powershell to use "text to speech" in my bash script. I tried this and it run only in PS but not in wsl :
$sp = New-Object -ComObject SAPI.SpVoice
$sp.Speak("Hello...")
I tried also this in wsl but it doesn't work either:
powershell.exe $sp = New-Object -ComObject SAPI.SpVoice
powershell.exe $sp.Speak("Hello...")