Reading Chinese and English text using LabVIEW [Zhuan]

Source: Internet
Author: User
Tags sapi


This article describes how to read Chinese and English texts in LabVIEW.
LabVIEW, text reading, TTS, speech SDK
1. Brief introduction to the text reading (TTS) Technology
Text-to-speech (also called speech synthesis) technology, it converts computer-generated or external-input text information into a well-understood and fluent output of spoken Chinese, and is affiliated with speech synthesis. Speech synthesis is a technology that generates artificial speech by means of mechanical and electronic means. Compared with some applications that use pre-recorded audio files for voice recording, TTS technology is used to directly convert text into audio output, which eliminates the need for a large number of audio files and saves storage space, simplify the program. Currently, many applications have applied TTS technology to implement speech functions, such as reading words in an electronic dictionary ).
2. About Microsoft Speech SDK
Microsoft Speech components mainly include speech application programming interfaces (SAPI), speech recognition engine (TR), and speech synthesis engine (TTS ). The Speech API structure isolates the connection between the application software and the speech engine, so that the replacement of the Speech engine does not affect the operation of the original application. The Speech API only provides a series of interfaces, and it cannot do anything. The program written using this API can run only with the support of the voice engine. Speech recognition engine Sr (speech recognize) is used to recognize speech. It can convert speech into text output. The speech synthesis engine TTS (Text to Speech) is used to synthesize speech. It can convert text into audio output or save it as an audio file for the player to play. For more information, see the Microsoft Speech SDK help document.
In LabVIEW (to 7. Take version 1 as an example:
1. Install Microsoft Speech sdk5.1 and the Chinese engine speechsdk5.1langpack;
2. Open the sound engine
Create a VI in the LabVIEW environment, select functions-communication-ActiveX-automation open in block digoal, and then create automation refnum, right-click Select ActiveX class-browse, select Microsoft Speech Object Library version 5.0 from the type library drop-down box, and select the attribute isspeechvoice from the objects box, as shown in:
3. Configure sound attributes
Create a property node and select the following attributes: Voice style voice (male voice, Chinese and English), speech rate, Volume volume, and audio format type, as shown in:

4. Play text
Create method node invoke node and select the Speak method. As shown in:

5. Disable sound engine
Call the close reference node to disable the sound engine.
Shows the program block divisor: (only the read part is provided. Other functions such as pause, stop, and text indication can be easily implemented based on other attributes or methods)

Shows the program front panel:

This article briefly introduces the text reading technology in LabVIEW, and provides specific implementation steps. More functions can be implemented in conjunction with the reference manual provided to Microsoft.
Note: To understand this article, you must be familiar with the LabVIEW development platform and Microsoft Speech SDK technology.
Microsoft Speech SDK (SAPI 5.1), version 5.1

This article from the csdn blog, reproduced please indicate the source:

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: 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.