@ericj: "The Pause method will pause an spVoice.Speak command, but the voice is still
queued.  How do you stop a speak command and discard the stream?
- ej"
    @Anubixyahoocom: "Hello, 
I'm using this code to try and stop the voice from talking by pressing a 
button or key, but I can't seem to be able to clear the buffer.  It keeps 
talking and if I click my Stop button the app hangs and then crashes.
Here's the code I'm using
-
Private Sub cmdSpeak_Click()
    Dim Voice As SpVoice
    Dim TempTalk As String
    Set Voice = New SpVoice
    TempTalk = "Artículo titulado: " & CurrentTitle & ".  " & Text1.Text
    Text1.Refresh
    Voice.Speak TempTalk, SVSFlagsAsync, SVSFPurgeBeforeSpeak
End Su
-
Private Sub cmdStopButton_Click()
    Dim Voice As SpVoice
    Set Voice = New SpVoice
'    If spVoice1.Status.RunningState = SRSEIsSpeaking Then
'        Me.StatusBar1.SimpleText = "Running state is: " & 
spVoice1.Status.RunningState
        Voice.Speak "", vtxtsp_VERYHIGH + SVSFPurgeBeforeSpeak
'    End If
End Su
-
Thanks for all your help.
<quote>"
    @davewood: "I'm not sure, but it looks like you are doing something weird with your 
arguments to Speak.
The SVSFFlagsAsync and SVSFPurgeBeforeSpeak are bit flags so they need to be 
OR'ed together. I think you use the OR keyword in VB for this. They need to 
be passed as the second argument to the Speak call.
And I'm not sure what vtxtsp_VERYHIGH is but I don't think it wants to be 
passed to the Speak call.
Disclaimer: I'm not a VB expert so I'm not certain of the exact syntax you 
need ...
One other thought is that this is some kind of TTS engine problem. Are you 
using a Spanish engine? Which one? You can test if the stopping and starting 
by using the Speech Control Panel "Preview Voice" and "Stop" buttons.
Dave Wood
This posting is provided "AS IS" with no warranties, and confers no rights.
"Anubix$yahoo_com" <email_address> wrote in 
message news:<email_address>
<quote>"
{'source': 'USENET', 'other_information': '{"reply_count": 2, "forum_name": "microsoft.public.speech_tech.sdk.20140221.mbox"}', 'file': 'data/output/usenet-microsoft.public.parquet'}