Speak-Russian
Speaks text in Russian
#requires -version 5.1
param([string]$text = "")
try {
if ($text -eq "") { $text = Read-Host "Enter the Russian text" }
$TTS = New-Object -ComObject SAPI.SPVoice
foreach ($voice in $TTS.GetVoices()) {
if ($voice.GetDescription() -like "*- Russian*") {
$TTS.Voice = $voice
[void]$TTS.Speak("????? ??????? ? ??????? ? ????????? ?????!")
exit 0 # success
}
}
throw "No Russian text-to-speech voice found - please install one"
} catch {
"?? ERROR: $($Error[0]) (script line $($_.InvocationInfo.ScriptLineNumber))"
exit 1
}Specifies the Russian text