CLR - Speech Synthesizer

Started by stanl, September 20, 2020, 03:29:18 AM

Previous topic - Next topic

stanl

Code (WINBATCH) Select


;Winbatch 2020a - testing CLR Speech Synthesizer
myWav = "C:\temp\test.wav"
ObjectClrOption('useany', 'System')
ObjectClrOption('useany', 'System.Speech')
oSpeech =  ObjectClrNew('System.Speech.Synthesis.SpeechSynthesizer')
oSpeech.SetOutputToDefaultAudioDevice()
oSpeech.Volume = 90
oSpeech.Speak("What is your favorite color?")
oSpeech.SetOutputToWaveFile(myWav)
oSpeech.Speak("In case you didn't hear me, I've saved this - so - What is your favorite color?")
oSpeech.Dispose()
oSpeech =0


If FileExist(myWav) Then Message("Audio File Created",myWav)
Exit



bottomleypotts

Just looking at what else CLR can do. This may be handy for another project. Wondering why this no longer works? Error 1261: COM/CLR Exception

stanl


td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

bottomleypotts

Hmmm. Windows 10 out of the box?? Or do I need to add something else?