First of all: this is not a duplicate of Delphi and SAPI. I have a specific problem with the \"SAPI in Delphi\" subject.
I have used the excellent Import Type-Librar
I was having the same problem in Delphi XE2. The Set8087CW(SavedCW or $4)
solution presented in the question did not work for me. It merely replaced the division by zero exception with another floating point exception.
What did work for me is this:
SavedCW := Get8087CW;
SetFPUExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]);
SpVoice.Speak('All floating point exceptions disabled!', 0);
Set8087CW(SavedCW);
You may find interesting to see this CodeRage 4 session on "Speech Enabling Delphi Applications (zip)" You'll get the "how-to" you're looking for... (and I guess you are on Vista or + as the the zero divide did not happend on XP)