|
-
Jul 14th, 2000, 11:54 AM
#1
Thread Starter
Addicted Member
No, this is not a DoEvents thing.
My latest app. uses the Text-to-Speech engine, so that I have an audible help file. The engine reads from a hidden textbox, which is loaded with the appropriate text for the question.
My question is...how can I create a pause in the text i.e
Text1 = " Blah, blah, blah [pause] blah, blah [pause] blah, blah"
The speech engine ignores long spaces in the text, so that doesn't work, I've tried things like [pause], but it reads
square left bracket pause square right bracket.
Does anyone know what the engine recognises as a pause?
Please help if you can, I've tried dozens of statements and have run out of ideas.
GRAHAM
-
Jul 14th, 2000, 12:37 PM
#2
Hyperactive Member
I've never used the Text to speech engine so this might not be helpful at all(I have my doubts), but could you do something like this:
Code:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()\
Text1.Text = "Hi my name is " & sSleep(500) & "Joe" & vbCrLf _
& "I have a " & sSleep(500) & "wife, two kids and " & vbCrLf _
& "I work in a " & sSleep(5000) & "button factory"
End Sub
Private Function sSleep(ByVal stime As Long)
'Define a pause
Call Sleep(stime)
End Function
Just a thought....
-
Jul 14th, 2000, 12:44 PM
#3
Use the Pause method. It's used in conjunction with the Resume method.
Code:
'Pause the Speech Engine
DirectSR1.Pause
'Do code when paused here...
'Resume the Speech Engine
DirectSR1.Resume
-
Jul 14th, 2000, 12:55 PM
#4
Mistake
I made a mistake. Place the code you want to do when paused in the Paused Event.
Code:
Private Sub DirectSR1_Paused()
'Do code when paused here
End Sub
-
Jul 14th, 2000, 06:16 PM
#5
Thread Starter
Addicted Member
Thanks fo the response reeset, unfortunately that will not work, because whatever is between the quotes will be read rather than executed.
Megatron, I,m using DirectsSS not SR. What I need is something that would implement a 'dramatic pause' or the like. A word or a certain string of characters must exist to implement this, as it will ignore dddddddddd used in different ways, but it just skips over it rather than pausing. It recogises rubbish text, so in all probability it will recognise a pause phrase.
Is there a way to code:
If (somewhere) in Text1, characters = !PAUSE! Then
Call SpeechPause 5
End If
Is this even possible?
I can't even find information on this control to get some pointers. I would have thought MS would have it documented somewhere!
CannotFindPause:
(Last resort...break text into smaller sections and call one after another with pause routine in between)
Any further help appreciated
GRAHAM
-
Jul 14th, 2000, 07:09 PM
#6
Try looking into the AudioPause and AudioResume methods.
Code:
'Pause the Engine
DirectSS1.AudioPause
'Resume the Engine
DirectSS1.AudioResume
-
Jul 14th, 2000, 07:39 PM
#7
Thread Starter
Addicted Member
I,ve already looked into those methods Megatron and I cannot see a way of implementing them WITHIN the text. As I mentioned before, I need a way to scan through the text for an instance of say !PAUSE! then execute a statement for each instance.
Is there a way to do this?
I still think there is a word that is recognisable as a pause
Tried
[pause] <pause> etc
[silent]
[break]
[pause text]
and dozens more
I still need suggestions
GRAHAM 
-
Jul 15th, 2000, 11:09 AM
#8
Implementing them within the Text? Try using the Pau Control Tag.
Code:
'Pause for 1 second (1000 milliseconds) between "Hello" and "Bye"
DirectSS1.Speak = "Hello \Pau=1000\ Bye"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|