Using a plug-in which I did ages ago (and its only availiable in source code now) :
Rem Project: TestSpeech
Rem Created: 05/09/2004 10:06:57
Rem ***** Main Source File *****
Rem Project: TestSpeech
Rem Created: 13/01/2003 18:33:20
Rem ***** Main Source File *****
ptr=make memory(1024)
x=getVoices()
print "Number of Voices:";x
print "Voices:";returnVoiceList$()
sync
print SetVoice(1)
print say("<volume level="+chr$(34)+"50"+chr$(34)+"> This text should be spoken at volume level fifty.",0)
print setVoice(2)
print say("Voice 2",0)
print say("To be or not to be, that is the question.",SPF_ASYNC)
x=say(".\TEST.INI","MESSAGE","LINE0",SPF_ASYNC)
rem Wait while speech gets ready
x=IsSpeaking()
while x=SPEECH_ABOUTTOSTART
sync
x=IsSpeaking()
endwhile
x=IsSpeaking()
while X=SPEECH_CONTINUING
print "Its talking!"
x=IsSpeaking()
sync
endwhile
print "Finished this one"
sync
print say("Initiating self-destruct mechanisim. Have a nice day!",SPF_ASYNC)
print WaitUntilDone(2000)
print "Please Wait... Writing speech to file"
print "Result:";SpeechToWav("Hello World1","C:\SPEECH1.WAV",SPSF_8kHz8BitStereo)
print "Result:";SpeechToWav("Hello World2","C:\SPEECH2.WAV",SPSF_8kHz8BitStereo)
print "Press any key when SAY has finished."
print "DeInit:";SpeechDeInit()
delete memory (ptr)
wait key
end