[futurebasic] Re: [FB] Speech in OSX

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2004 : Group Archive : Group : All Groups

From: Brian Stevens <brilor@...>
Date: Thu, 19 Feb 2004 15:42:26 -0700
On Feb 19, 2004, at 8:07 AM, Edwards, Waverly wrote:

>
> Does anyone have an example of using speech in OSX
>
>
> Thanks,
>
>

Not the most robust but might be a start.........



include "Tlbx SpeechSynthesis.Incl"

clear local
#if ndef _gestaltSpeechMgrPresent
_gestaltSpeechMgrPresent = 0
#endif
local fn hasSpeechMgr' returns non-zero if Speech Mgr present
dim @ speechAttr as long
end fn = fn Gestalt(_"ttsc",speechAttr) = _noErr and (speechAttr and 
_gestaltSpeechMgrPresent%)

dim err as short
long if fn hasSpeechMgr
err = fn SpeakString ("Hey Waverly")
while fn SpeechBusy
wend
end if

do
handleevents
until gFBquit