Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help on SAPI.LIB

62 views
Skip to first unread message

Paolo Borlandi

unread,
Jan 9, 2005, 1:06:59 PM1/9/05
to
I'm trying to use Microsoft Speech SDK but i'm having problems in linking
the test program. The following errors arise:

[Linker Error] Unresolved external '_IID_ISpVoice' referenced from
D:\BORLAND\CBUILDER5\PROJECTS\UNIT1.OBJ
[Linker Error] Unresolved external '_CLSID_SpVoice' referenced from
D:\BORLAND\CBUILDER5\PROJECTS\UNIT1.OBJ

Have some help? I think the sapi.lib is not ok...

THANK YOU VERY MUCH!!!

Paolo from Italy


Vladimir Stefanovic

unread,
Jan 9, 2005, 1:53:38 PM1/9/05
to
Go here:

http://www.microsoft.com/msagent/downloads/user.asp

and download:

1. MS Agent Core Component
2. Text-to-speech engine
3. SAPI 4 Runtime binaries

Install all (sequence is not important)

Then go to BCB:

Main Menu / Component / Import Active X Control

Scroll down untill you see in the 'Class name' area:
TTextToSpeech

Install it (and build)

I'm not sure, I think that you should install the package
here, via:

Main Menu / Component / Install packages

... but I realy cannot remember. Try yourself anyway.

TTextToSpeech should appear as a component at
ActiveX tab.

If you drag/dropped the component on your form, you
can use it something like this:

TextToSpeech->Speak( (WideString)"Say something" );

Also see the rest of the downloads on MS site because there
are some nice things you can use in your projects.


Best regards,
Vladimir Stefanovic
"Paolo Borlandi" <pbor...@virgilio.it> wrote in message
news:41e1...@newsgroups.borland.com...

Remy Lebeau (TeamB)

unread,
Jan 10, 2005, 3:10:11 AM1/10/05
to

"Vladimir Stefanovic" <anti...@po.sbb.co.yu> wrote in message
news:41e17dad$1...@newsgroups.borland.com...

> Go here:
>
> http://www.microsoft.com/msagent/downloads/user.asp
>
> and download:
>
> 1. MS Agent Core Component
> 2. Text-to-speech engine
> 3. SAPI 4 Runtime binaries

You don't need MSAgent in order to use SAPI. SAPI is standalone, it does
not use MSAgent. MSAgent, on the other hand, uses SAPI.


Gambit


Remy Lebeau (TeamB)

unread,
Jan 10, 2005, 3:50:27 AM1/10/05
to

"Paolo Borlandi" <pbor...@virgilio.it> wrote in message
news:41e1...@newsgroups.borland.com...

> I'm trying to use Microsoft Speech SDK but i'm having problems


> in linking the test program. The following errors arise:

You did not add the .lib files to your project. Not only that, but you
cannot use Microsoft .lib files in Borland compilers to begin with. They
are not compatible. The best way to get around those errors is to just
define the values in your code directly:

const IID IID_ISpVoice = {0x6C44DF74, 0x72B9, 0x4992, {0xA1, 0xEC, 0xEF,
0x99, 0x6E, 0x04, 0x22, 0xD4}};

const CLSID CLSID_SpVoice = {0x96749377, 0x3391, 0x11D2, {0x9E, 0xE3,
0x00, 0xC0, 0x4F, 0x79, 0x73, 0x96}};


Gambit


Paolo Borlandi

unread,
Jan 10, 2005, 2:40:42 PM1/10/05
to
Many thanks to all

I did what Mr. Stefanovic said and all is right. Ok MsAgent is not
important. In this way you have the Activexes available in VCL and is very
simple to use them.

Paolo


"Remy Lebeau (TeamB)" <no....@no.spam.com> ha scritto nel messaggio
news:41e24163$1...@newsgroups.borland.com...

Vladimir Stefanovic

unread,
Jan 10, 2005, 3:07:21 PM1/10/05
to
I'm not sure if I was clear enough. For example,
I made a mini dictionary which has a capabilitie
of pronouncing words. I can use the app because
I previously installed the two mentioned exe's from
MS site.

When I want to deploy the app to some other machine
should I also mention that these two exe's should be
installed by the user or there is some other way.


--
Best regards,
Vladimir Stefanovic


"Vladimir Stefanovic" <anti...@po.sbb.co.yu> wrote in message

news:41e2...@newsgroups.borland.com...
> Remy, can you please tell me something about
> deployment this type of apps, ie when Component
> is from the ActiveX tab and has become available
> after installing:
>
> Text-to-speech engine
> SAPI 4 Runtime binaries
>
> Should the user also install these two executables by
> himself or there is something more easy?
>
>
>
>
> Best regards,
> Vladimir Stefanovic
>


Vladimir Stefanovic

unread,
Jan 10, 2005, 3:03:45 PM1/10/05
to

Remy Lebeau (TeamB)

unread,
Jan 10, 2005, 3:10:25 PM1/10/05
to

"Remy Lebeau (TeamB)" <no....@no.spam.com> wrote in message
news:41e24163$1...@newsgroups.borland.com...

> You did not add the .lib files to your project. Not only that, but
> you cannot use Microsoft .lib files in Borland compilers to begin with.

I forgot to mention that there is a BCB-compatible version of sapi.lib for
SAPI 5 available at http://makefiles.lebeausoftware.org


Gambit


Remy Lebeau (TeamB)

unread,
Jan 10, 2005, 3:12:16 PM1/10/05
to

"Vladimir Stefanovic" <anti...@po.sbb.co.yu> wrote in message
news:41e2...@newsgroups.borland.com...

> Remy, can you please tell me something about
> deployment this type of apps, ie when Component
> is from the ActiveX tab and has become available
> after installing:

I never import ActiveX controls that way in the first place, but that is
just my personal preference. I prefer to load them manually in my own code.
Then I have absolute control over their usage.

> Should the user also install these two executables by
> himself or there is something more easy?

Yes, the user must install them, or else the components have nothing to load
at run-time.


Gambit


Vladimir Stefanovic

unread,
Jan 10, 2005, 3:26:37 PM1/10/05
to
> I never import ActiveX controls that way in the first place,
> but that is just my personal preference. I prefer to load
> them manually in my own code. Then I have absolute control
> over their usage.


Remy, how do you 'load them manually'?
(I never did anything similar)


Best regards,
Vladimir Stefanovic

Remy Lebeau (TeamB)

unread,
Jan 10, 2005, 3:51:05 PM1/10/05
to

"Vladimir Stefanovic" <anti...@po.sbb.co.yu> wrote in message
news:41e2...@newsgroups.borland.com...

> Remy, how do you 'load them manually'?

By using CoCreateInstance() to instantiate ActiveX controls and then access
their interfaces directly, not via VCL wrappers.


Gambit


Elias Berelian

unread,
Mar 3, 2005, 11:16:00 AM3/3/05
to
Hello

We have a similar application where we want to communicate with voice modems
and do Speech Synthesis (SS) & Speech Recognition (SR). First we tried to
use the SapiEngine from TurboPower's AsynchPro version 4 package. It caused
problems, on entry it would say something like "not optimized for phone". We
have a Dialogic 4 port board in a Windows 2000 platform and we are using
BCPPB6. It was able to play wave files and DTMF tones into the phone. But
the output of SS would only work into the sound card speakers. The
application would also crash on exit.

We then looked at this thread of messages and subsequently we tried using
TTextToSpeech as recommended in this thread. We don't have any help files
for this and we don't know how to direct its output into the phone lines.
Sound board speakers still work. No crashes. Also when we try to use
TDirectSS we get:

[C++ Error] TAPIUnit1.h(83): E2015 Ambiguity between 'TDirectSS' and
'Adisapi::TDirectSS'

Does anyone have any suggestions for getting any of these to work? Code
snippets will be appreciated so that if we need to send "handles" we know
how to get a handle.


"Vladimir Stefanovic" <anti...@po.sbb.co.yu> wrote in message

news:41e17dad$1...@newsgroups.borland.com...

0 new messages