[futurebasic] RE: [FB] Speech in OSX

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

From: "Edwards, Waverly" <Waverly.Edwards@...>
Date: Thu, 19 Feb 2004 18:03:33 -0500
Cool beans.


W.

-----Original Message-----
From: Brian Stevens [mailto:brilor@...]
Sent: Thursday, February 19, 2004 5:42 PM
To: futurebasic@...
Subject: Re: [FB] Speech in OSX



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

--