Add-Type -AssemblyName System.Speech
$text = "Hi this is text to wav"
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer
$streamFormat = [System.Speech.AudioFormat.SpeechAudioFormatInfo]::new(8000,[System.Speech.AudioFormat.AudioBitsPerSample]::Sixteen,[System.Speech.AudioFormat.AudioChannel]::Mono)
$speak.SetOutputToWaveFile("C:\Temp\sound.wav",$streamFormat)
$speak.Speak($text)
$speak.Dispose()
Comments
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎