Talking AutoCAD

The “AutoCADder” posted about a good tip regarding the use of Microsoft’s speech engine in AutoCAD. I found a thread on the same idea over at the Swamp.  The code is fairly simple.

(setq sapi (vlax-create-object “Sapi.SpVoice”))
(vlax-invoke sapi “Speak” “This is talking AutoCAD” 0)
(vlax-release-object sapi)

Head over to this thread at the Swamp for some discussion and more ideas with code samples.

For you CAD managers, put this in your networked “acaddoc.lsp” and watch the phone start ringing at your desk.

(defun mySpeak (str)
  (setq sapi (vlax-create-object “Sapi.SpVoice”))
  (vlax-invoke sapi “Speak” str 0)
  (vlax-release-object sapi)
)
(mySpeak (strcat “Welcome ” (getvar “loginname”)))