|
-
Dec 13th, 2018, 05:03 PM
#5
Thread Starter
Lively Member
Re: Direct Text-To-Speech - Simultaneous Voices?
 Originally Posted by PGBSoft
Hello,
How about the following then?
Code:
Option Explicit
Private spv1 As SpeechLib.SpVoice
Private spv2 As SpeechLib.SpVoice
Private Sub Form_Load()
Set spv1 = New SpVoice
Set spv2 = New SpVoice
spv2.Priority = SVPOver
Set spv1.Voice = spv1.GetVoices.Item(0) 'male voice
Set spv2.Voice = spv2.GetVoices.Item(1) 'female voice
End Sub
Private Sub Command1_Click()
spv1.Speak "Hello, First voice goes here. Did you hear the second voice too?", SVSFlagsAsync
spv2.Speak "Hi, This is second voice", SVSFlagsAsync
End Sub
That did it. But how could I create an array of them, so that it's not needed to specify just 2? That way, it would keep creating new voices each time I clicked the command button. Example: When I quickly click the Command Button 5 times, it creates 5 new voices, all speaking over each other.
Tags for this Thread
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
|