You also do not need to supply any window or messageNum arguments to SpeechOpen().
Here then is an example of speaking some text:
OPTIONS "C_CALL" /* Load REXXSPEECH.DLL and register all its functions. */ LIBRARY rexxspeech /* Get user's choice of speech engine, and save its ID. */ id = SpeechVoiceDlg() IF id == "" THEN DO SAY "Error getting speech device ID, or user cancelled" RETURN END /* Open that speech engine, and save its voice parameter. */ voice = SpeechOpen(id) IF voice == "" THEN DO SAY "Error opening/initializing the speech voice!" RETURN END /* If desired, you can call SpeechVolume, SpeechPitch, * or SpeechSpeed here, to set (or query) the settings * for volume, pitch, and speed, respectively. */ /* Speak some text. */ error = SpeechSpeak(voice, "Hello world.") IF error \== "" THEN SAY "Error speaking text:" error /* If desired, you can make further calls to SpeechSpeak here. */ /* Close the speech engine. */ SpeechClose(voice)