Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Windows Text to Speech (TTS)


This question is answered.


Permlink Replies: 7 - Last Post: Oct 8, 2014 2:32 PM Last Post By: Nicholas Gessler
Nicholas Gessler

Posts: 20
Registered: 1/25/98
Windows Text to Speech (TTS)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2014 12:36 PM
Is there a way to access the Microsoft Text-to-Speech module from a VCL application? Is there a way to talk to it like we can talk to the standard MIDI device or through a Visual Component? If so, a block of sample code would be appreciated to get us started.
Many thanks,
Nick
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Windows Text to Speech (TTS)
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2014 12:51 PM   in response to: Nicholas Gessler in response to: Nicholas Gessler
Nicholas wrote:

Is there a way to access the Microsoft Text-to-Speech module from
a VCL application?

Of course. Look at Microsoft's Speech API (SAPI):

http://msdn.microsoft.com/en-us/library/ms723627.aspx
http://msdn.microsoft.com/en-us/library/ee125663.aspx

You would use CoCreateInstance() to create an instance of the ISpVoice object,
configure it as needed, and then call its Speak() method.

If so, a block of sample code would be appreciated to get us started.

There are plenty of online SAPI tutorials, some even geared towards Delphi/C++Builder.

--
Remy Lebeau (TeamB)
Nicholas Gessler

Posts: 20
Registered: 1/25/98
Re: Windows Text to Speech (TTS)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2014 1:20 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Nicholas wrote:

Is there a way to access the Microsoft Text-to-Speech module from
a VCL application?

Of course. Look at Microsoft's Speech API (SAPI):

http://msdn.microsoft.com/en-us/library/ms723627.aspx
http://msdn.microsoft.com/en-us/library/ee125663.aspx

You would use CoCreateInstance() to create an instance of the ISpVoice object,
configure it as needed, and then call its Speak() method.

If so, a block of sample code would be appreciated to get us started.

There are plenty of online SAPI tutorials, some even geared towards Delphi/C++Builder.

--
Remy Lebeau (TeamB)
Nicholas Gessler

Posts: 20
Registered: 1/25/98
Re: Windows Text to Speech (TTS)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2014 1:24 PM   in response to: Nicholas Gessler in response to: Nicholas Gessler
OK, super, thank you Remy...
Is "SAPI" invoked by the Window "Speech Properties" that pops up in Win7 and Win8 when I "Search Programs and Files" for "text to speech"?
Just trying to get my bearings.
Nick
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Windows Text to Speech (TTS)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2014 1:31 PM   in response to: Nicholas Gessler in response to: Nicholas Gessler
Nicholas wrote:

Is "SAPI" invoked by the Window "Speech Properties" that pops up in
Win7 and Win8 when I "Search Programs and Files" for "text to speech"?

Yes.

--
Remy Lebeau (TeamB)
Nicholas Gessler

Posts: 20
Registered: 1/25/98
Re: Windows Text to Speech (TTS)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2014 2:20 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Hi Remy,

I'm sure you could set this up in a flash. I'm not asking you to do my work for me, only to get me started. I've spent the last hour going over the links you mentioned and several other sources and at this point it doesn't help. I did find one VCL application, with obvious errors which I corrected, but with many more serious ones. I am far from an expert programmer, but I do provide a service to my students and others who visit my website:
https://web.duke.edu/isis/gessler/borland/
I need a bare-bones example to get started...

Regards,
Nick

Edited by: Nicholas Gessler on Oct 7, 2014 2:20 PM
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Windows Text to Speech (TTS) [Edit]
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 7, 2014 5:48 PM   in response to: Nicholas Gessler in response to: Nicholas Gessler
Nicholas wrote:

I need a bare-bones example to get started...

See this:

http://stackoverflow.com/questions/15259361/

--
Remy Lebeau (TeamB)
Nicholas Gessler

Posts: 20
Registered: 1/25/98
Re: Windows Text to Speech (TTS) [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 8, 2014 2:32 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Super!
I got it to speak, which is a start.
I need some time to play with it.
Thank you Remy.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02