Getting+the+current+voice

//by Richard Russell, March 2013//

//**This article is specific to the SAPI5 speech system, typically installed on Windows 2000, XP and later**//

The code below can be used to discover the currently selected voice name: code format="bb4w" voice$ = FN_getvaluestr(tts%, "Voice.GetDescription") code Where **tts%** is the value returned from.

Here is a self-contained program illustrating its use: code format="bb4w" INSTALL @lib$+"COMLIBA" ON ERROR PROC_comexit : PRINT 'REPORT$ : END ON CLOSE PROC_comexit : QUIT PROC_cominit tts% = FN_createobject("Sapi.SpVoice") IF tts%=0 ERROR 100, "SAPI5 is not available" voice$ = FN_getvaluestr(tts%, "Voice.GetDescription") PRINT voice$ PROC_releaseobject(tts%) PROC_comexit END code