Board index » cppbuilder » SAPI 5.1 with builder example for a newcomer?

SAPI 5.1 with builder example for a newcomer?

Can anyone point me towards an example of Borland Builder utilizing SAPI 5.1
from Microsoft?  I wish to develop applications with TTS capabilities.  I
have had limited success with Direct Text-to-Speech (XVoice.dll), but am
wondering if SAPI 5.1 now makes things easier...
Trying to use COFF2OMF, IMPLIB, IMPDEF etc. with the sapi.lib and .dll is
not getting me anywhere (see www.bcbdev.com/faqs/faq92.htm).
Thanks in advance.
 

Re:SAPI 5.1 with builder example for a newcomer?


SAPI 5.1 is COM-based, you don't need to statically link to the DLL at all,
just instantiate the desired COM interface using CoCreateInstance().  The OS
will handle the rest for you.  The only thing you need to include in your
applcation is the .cpp and .h files that Builder generates for you when it
imports the COM type library for SAPI that is available for use after SAPI
is installed on your system.  Look at the "Import ActiveX Control" menu
option.

Gambit

Quote
"Dan Joerissen" <dan.joeris...@canam.com> wrote in message

news:3c928875$1_1@dnews...
Quote
> Can anyone point me towards an example of Borland Builder
> utilizing SAPI 5.1 from Microsoft?  I wish to develop applications
> with TTS capabilities.  I have had limited success with Direct
> Text-to-Speech (XVoice.dll), but am wondering if SAPI 5.1 now
> makes things easier... Trying to use COFF2OMF, IMPLIB, IMPDEF
> etc. with the sapi.lib and .dll is not getting me anywhere (see
> www.bcbdev.com/faqs/faq92.htm).

Re:SAPI 5.1 with builder example for a newcomer?


Thanks for the reply.  I included the SpeechLib_OCX.cpp and .h into my
project, and things seemed to work.  However, when I tried to use the Speak
method just like in the SAPI 5.1 documentation (Text to Speech with Events
tutorial), I couldn't use SPF_ASYNC.  It seemd to be trying to use the
automation method SpVoice.Speak instead.  Not sure why...

I also tried to utilize a TSpVoice component instead.  Things went a lot
better when I moved from BCB4 to BCB5; the import type library worked
better.  I simply dropped the component on a form and used its Speak method.
That's it.  Seemed to go quite well.  I guess I'm learning the difference
between a lower level SAPI COM route vs. the using a component from the
import library (automation?) route?

I'm not sure what you wanted me to see when you said to "Look at the Import
ActiveX Control menu...
Regards,

"Remy Lebeau [TeamB]" <gambi...@yahoo.com> wrote in message
news:3c92e043$1_2@dnews...

Quote
> SAPI 5.1 is COM-based, you don't need to statically link to the DLL at
all,
> just instantiate the desired COM interface using CoCreateInstance().  The
OS
> will handle the rest for you.  The only thing you need to include in your
> applcation is the .cpp and .h files that Builder generates for you when it
> imports the COM type library for SAPI that is available for use after SAPI
> is installed on your system.  Look at the "Import ActiveX Control" menu
> option.

> Gambit

> "Dan Joerissen" <dan.joeris...@canam.com> wrote in message
> news:3c928875$1_1@dnews...
> > Can anyone point me towards an example of Borland Builder
> > utilizing SAPI 5.1 from Microsoft?  I wish to develop applications
> > with TTS capabilities.  I have had limited success with Direct
> > Text-to-Speech (XVoice.dll), but am wondering if SAPI 5.1 now
> > makes things easier... Trying to use COFF2OMF, IMPLIB, IMPDEF
> > etc. with the sapi.lib and .dll is not getting me anywhere (see
> > www.bcbdev.com/faqs/faq92.htm).

Re:SAPI 5.1 with builder example for a newcomer?


That is the option you have to use to import an existing ActiveX control
into a project so Builder can generate wrapper code for it for you to use.

Gambit

Quote
"Dan Joerissen" <dan.joeris...@canam.com> wrote in message

news:3c9a6f06$1_2@dnews...

Quote
> I'm not sure what you wanted me to see when you said to "Look at the
Import
> ActiveX Control menu...

Re:SAPI 5.1 with builder example for a newcomer?


My next question is regarding options for deploying SAPI 5.1 TTS
applications:

According to the SAPI 5.1 setup white paper,
1) "The easiest way to build a Setup package that incorporates the SAPI 5.1
redistributable merge modules is to use a Setup tool that is designed
specifically for the Windows Installer technology...Install Shield for
Windows Installer, Visual Studio Installer, Wise for Windows Installer, and
Seagate WinINSTALL ..."

2) Otherwise it suggests "downloading the Windows Installer SDK and building
your Setup package manually."

Since I'm working with Borland Builder 5, I only have InstallShield Express,
and option 2 above is not straightforward.

Is the following a third option?  How about your intended user download the
SDK from www.microsoft.com/speech (if they are on a high speed connection
since it is 68 MB).  Or how about having this available on a cd for them to
install from?

Thanks in advance,

Other Threads