realbasic-nug
[Top] [All Lists]

Re: stopping speak

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: stopping speak
From: Charles Yeomans <yeomans at desuetude dot com>
Date: Sun, 31 Oct 2004 12:15:05 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <a05111b00bdaac7d20ec2 at [203 dot 112 dot 203 dot 38]>

On Oct 31, 2004, at 11:56 AM, Carlo Rubini wrote:

Hello,

how to stop a speech process started buy <speak(myString)> ?

I call the StopSpeech method from the mouseDown event of an editField but the speech process doesnt stop.

(mSpeechChannel is a property)

1. Method: stopSpeech:
 dim res as integer
   if mSpeechChannel <> 0 then
    res = DisposeSpeechChannel(mSpeechChannel)
    if res<>0 then
    msgBox "DisposeSpeechChannel() returned "+Format(res, "-#")
    end if
    mSpeechChannel = 0
  end if

2. Function: DisposeSpeechChannel

Declare Function DisposeSpeechChannel Lib SpeakLib (chan as Integer) as Integer
return DisposeSpeechChannel(channel)

 Corrections/suggestions welcome, thanks

How did you get a value for mSpeechChannel? If you're using the Rb function Speak, I don't see how to get it. Assuming that you have a valid speech channel value, I'd think that StopSpeech would be the function to use; DisposeChannel releases resources and that sort of thing.

--------------
Charles Yeomans

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>