|
| SAPI4 Question |
 |
Wed, 16 Apr 2008 14:55:22 -070 |
How do I set the default voice for SAPI4? Unlike SAPI5 where you can
even do a test sentence there does not appear to be a way to select
the voice! I am using AT&T voices but I cannot select them in my
software or on the control panel. I have a Microsoft agent2
application using VB .net on XP.
I know the voces work since I can test them individually doing the
pronounciation thing though it appears to default to a voice I don't
want.Failing that can I do an enum thing in VB .net for SAPI4?
The problem I have is that the voice on SAPI4 defaults to a male voice
and I need a female one.
The female one is installed and I can see it in the control panel for
SAPI4 - but how can I select it as default?
I also use SAPI5 at the same time for recognition but I don't have to
use it for text to speech.
I found I can use both SAPI5 and SAPI4 on the same program but it's
just that I cannot select the voice on SAPI4. On SAPI5 I can select
any voice I like both in software and the control panel.
Thanks
|
| Post Reply
|
| Re: SAPI4 Question |
 |
Wed, 16 Apr 2008 22:17:43 -070 |
On Apr 17, 9:55 am, kronec...@yahoo.co.uk wrote:
> How do I set the default voice for SAPI4? Unlike SAPI5 where you can
> even do a test sentence there does not appear to be a way to select
> the voice! I am using AT&T voices but I cannot select them in my
> software or on the control panel. I have a Microsoft agent2
> application using VB .net on XP.
>
> I know the voces work since I can test them individually doing the
> pronounciation thing though it appears to default to a voice I don't
> want.Failing that can I do an enum thing in VB .net for SAPI4?
>
> The problem I have is that the voice on SAPI4 defaults to a male voice
> and I need a female one.
> The female one is installed and I can see it in the control panel for
> SAPI4 - but how can I select it as default?
>
> I also use SAPI5 at the same time for recognition but I don't have to
> use it for text to speech.
> I found I can use both SAPI5 and SAPI4 on the same program but it's
> just that I cannot select the voice on SAPI4. On SAPI5 I can select
> any voice I like both in software and the control panel.
>
> Thanks
>
> K.
Actually I have managed to get it to work with a fudge from MASH. MASH
(a useful program for Agent 2 scripting) gives a vb.net class that I
can use. It is quite obscure the selection of the voice - you would
never guess.
Here it is for the MERLIN Microsoft Agent 2.
Private Sub AgentIntro()
On Error Resume Next
InitAgentCommands()
' *** BEGIN MASH USER SCRIPT ***
Merlin.MoveTo 882, 446
Merlin.Balloon.Style = &H220000F
Merlin.TTSModeID = ""
Merlin.Show
Merlin.Speak "Welcome to the Microsoft Agent Scripting Helper!"
' *** END MASH USER SCRIPT ***
End Sub
So this line
Merlin.TTSModeID = ""
appears to select the right SAPI4 voice!! How the hell you are suppose
to know that I will never know. In any case, I now have SAPI4 and
SAPI5 voices working one after the other in my program if I need it as
well as SAPI5 speech recognition.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|