Hi Thomas,

Without knowing the issue first hand, I just wanted to mention that if Sapi 5.3 and above is COM and is structured in a similar fashion to 5.1, you can't just say rate=5. Managed code probably gives you a wrapper that causes a function invokation to occur internally. In C++ you have to invoke the setter function for the property accessor. If you have the professional version of Visual Studio you can use ATL for that, otherwise you have to fiddle with variant structures directly. Setting a property is actually quite similar to making a method call.

Kind rewgards,

Philip Bennefall
----- Original Message ----- From: "Thomas Ward" <thomasward1...@gmail.com>
To: "Gamers Discussion list" <gamers@audyssey.org>
Sent: Monday, May 06, 2013 11:30 AM
Subject: Re: [Audyssey] sapi5 voice


Hi Jim,

I'm using the Windows 7 Platform SDK. The SAPI 5 SDK was discontinued
and rolled into newer versions of the Windows Platform SDK which makes
sense.

Anyway, for some reason every time I try to do something like
g_voice->Rate = 5;
in C++ it gives me an error. However, it works fine in C# .NET and VB .NET.

That said, there is an alternative way to change rate, pitch, and
volume in newer versions of SAPI. Versions of SAPI 5.3, 5.4, and 5.5
now use SML tagging to control the rate, pitch, and volume on the fly
like
g_voice->Speak(<ABSOLUTE_RATE=5>"Hello world!", SVSFlagsAsync, 0);
which works fine if a person is running Windows Vista, Windows 7, or
Windows 8, but isn't available on Windows XP and earlier. So that is
why I chose to use the Control Panel. :D

Cheers!


On 5/6/13, Jim Kitchen <j...@kitchensinc.net> wrote:
Hi Thomas,

I'm not sure about the sapi5 SDK that you are using, but the one that I am
using has such commands as

Voice.Speak g$
Voice.Speak g$, SVSFlagsAsync
Voice.Volume = 100
Voice.Rate = 0

So with the rate command you can change the rate of the speech from within
the game and don't need to do it in the control panel.

Like when I am playing the game of Life since I have played it so many times
over the years and really know each square on the board I really crank up
the rate of speech, but for other games, reading Email etc I have it more
around 3.

I still really like programming using the sapi5 speech. The only thing that
might make it even funner would be if it had some of the weird things that
the software DecTalk can do. You know I'm sure that you have heard it sing
etc.

BFN

     Jim

You're just jealous because the voices only talk to me.

j...@kitchensinc.net
http://www.kitchensinc.net
(440) 286-6920
Chardon Ohio USA
---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to
gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.


---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.


---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to