Hi Thomas,
Just a couple of tips that apply whether you choose the speech markup or
not:
1. Avoid the direct interface from C++ to Sapi. Use IDispatch. This is a
little harder, but when you call Sapi directly from the provided C++ API a
lot of commercial voices don't work for whatever reason. Early versions of
the tts_voice implementation in BGT did this, and I had to rewrite the code
from scratch to use IDispatch. Now it works everywhere.
2. I do recommend you take the time to fiddle with variants, at least if you
want to have a completely reliable method of setting the rate and volume
etc. With the tags you have to supply them each time you invoke speak, which
adds unnecessary overhead. In short, the settings are apparently not
persistent across speak method calls. I had to do this for pitch as it is
the only way, but I am very thankful that I didn't have to do it for rate
and volume as well. BGT now uses IDispatch calls for all Sapi communication,
and it works really well and was definitely worth the time fiddling with the
variants.
Good luck.
Kind regards,
Philip Bennefall
----- Original Message -----
From: "Thomas Ward" <thomasward1...@gmail.com>
To: <phi...@blastbay.com>; "Gamers Discussion list" <gamers@audyssey.org>
Sent: Monday, May 06, 2013 12:07 PM
Subject: Re: [Audyssey] sapi5 voice
Hi Philip,
Thanks. Now, that makes sense, and unfortunately I am not running
Visual Studio Pro. All I have here is the express versions so I don't
have ATL. Grrrrr.....
Anyway, your assessment was right on the money. SAPI 5.3 and above are
Com based, and that is why I can't just pass a value like 5 to rate
and 75 to volume. So for me, at least, I think the only workaround
will be to use SML tags since it doesn't require either A, paying mega
bucks for Visual Studio Pro, or B, fiddling with varient structures
directly.
Cheers!
On 5/6/13, Philip Bennefall <phi...@blastbay.com> wrote:
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
---
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.