Change the contents of text into sound output in office software

Source: Internet
Author: User

To make text audible is to turn the content of the text into sound output, that is, let the computer read out the contents of the text. This function is undoubtedly very useful in the practical teaching work. In Office XP Excel, there is the "from Text to Speech" feature, but must be implemented in an Excel environment, which gives us the ability to apply this functionality. Therefore, the author considers whether can open out the Excel environment, so that any text will be audible program. Through practice, the author uses VB6. 0 developed the "text aloud" program. The following is a brief introduction to the development process.

1. General Ideas

Create a Standard EXE project, create three command button controls on a form, a common dialog box control, and a RichTextBox control, and then through the triggering event of the [Open File] button, select the text file to read aloud, output the text to the RichTextBox box, and then pass the [ Start aloud button to trigger an event, call the Excel object's speech scheme, and read all the text in the RichTextBox box.

2. Preparatory work

To install Office XP on your computer first, install the Speech feature during Setup. Then, using the speech item in Control Panel, expand the Speech Properties dialog box, select the language, select Microsoft Simplified Chinese in the Drop-down box, or select the Chinese speech feature, otherwise you can read English without reading Chinese. You can also set the different voice and speech speed generated by your computer in this dialog box.

Second, in VB6.0, you reference common dialog boxes and RichTextBox two parts.

3. dialog boxes and the creation of controls

(1) Establish a Standard EXE project, named "Txtsound", the dialog box named "Frmsound".

(2) A RichTextBox control and a label control are arranged on the dialog box, named Richt and Lebt respectively.

(3) Add three command buttons to the dialog box, the first is the [Open File] button, named Cmdopen; the second is the [Start aloud] button, named Cmdread; the third is the Exit button, named Cmdexit.

(4) At the end of the dialog box, add a common dialog box, named Comd, whose Filter property is set to ". Txt,.rtf".

Related Article

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.