Delphi7 uses speech sdk5.1 to implement TTS

Source: Internet
Author: User

I like to read novels, but I cannot read novels at work.

I had a reading software, but I suddenly couldn't use it a year ago. I don't know if it was my computer problem. I used the spvoice of the Windows speech SDK to test whether there is sound.

So I decided to do it myself.

After installing the Windows speech SDK 5.1, I can use progect-improt type libary to import several controls to ActiveX.

Real voice Library: http://www.hydcd.com/softdown.htm#no3

I didn't see any other things. I mainly used spvoice.

The value range between spvocie. Rate-10 and 10 controls the language speed.

Spvoice. Volume 0 .. 100 volume control

Spvoice. Voice ispeechobjecttoken you can use getvoice to obtain ispeechobjecttokens, get all the available voice libraries of the local machine, and set to use the corresponding idea library.

To read aloud, use spvoice. Speak ('...', svsflagsasync );

I use the onstreamend event of spvoice to continue reading the next line of memo.

Simple to use, I feel pretty good

File address: http://download.csdn.net/detail/jinshaopu/5071464

Other things used

Setwindowpos (form1.handle, hwnd_topmost, swp_nomove or swp_nosize) form top

Scroll the scroll bar of memo. Perform (em_scroll, x, y) to a specific row.

Currentline: = memo. Perform (EM _ linefromchar,); get the current cursor row number

Memo. caretpos: = tpoint (X, Y) is set at the cursor position but does not scroll

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.