'============================================================================= ' ' Speak a line of text - example for PowerBASIC For Windows Compiler ' Copyright (c) 2008 PowerBASIC, Inc. ' All Rights Reserved. ' '============================================================================= #COMPILER PBWIN 9 #COMPILE EXE #DIM ALL ' Windows API Include file #INCLUDE "win32api.inc" ' Microsoft Speech SDK Include file ' Generated by the PowerBASIC COM Browser #INCLUDE "say.inc" %ID_TXT = 1000 %ID_SAY = 1001 ' Application main entry point FUNCTION PBMAIN () AS LONG DIM rec AS STRING STATIC SpVoice AS ISpVoice spVoice = NEWCOM $PROGID_SpVoice ' Create an instance of the ISpeechVoice Interface rec = COMMAND$ rec = UCODE$(rec) + $NUL + $NUL spVoice.Speak(BYVAL STRPTR(rec), %SVSFDefault, %NULL) END FUNCTION