
  uses com\voice 

  '
  '
  '
  '         ###############
  '       ###################
  '      ###               ###
  '     ###    ###          ###
  '    ###    ## ##         ###
  '    ###   ##   ##        ###
  '    ###  ##     ##       ###
  '    ###  ##      ##      ###
  '    ###  ##      ##      ###
  '    ###   ####  ##      ###
  '     ###    ####       ###
  '      ###             ###
  '       ###           ###
  '         #############
  '           #########

  dim as GUID          VoiceObjGuid, ISpVoiceGuid
  dim as HRESULT       hr
  dim as ISpVoice *    voice
  dim as LPUNKNOWN     pUnkOuter


  guidval VoiceObjGuid, "96749377-3391-11D2-9EE3-00C04F797396"
  guidval ISpVoiceGuid, "6C44DF74-72B9-4992-A1EC-EF996E0422D4"

  CoInitialize null

  hr=CoCreateInstance VoiceObjGuid, pUnkouter, context, ISpVoiceGuid, voice

  if hr then print "SAPI Error " hex(hr) : CoUninitialize()
  wbstring s="Hello Everyone!"

  voice.Speak s,0,null
  voice.WaitUntilDone 0xFFFFFFFF
  voice.Release : @ voice=0

  CoUninitialize()

