Example Code

Text to Speech using LabVIEW and Microsoft Speech SDK

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This examples shows how to convert a LabVIEW string into audible speech.

 

Description

This example VI utilizes LabVIEW expansive ActiveX controls to convert text into audible speech. To use the VI, you need to download and install Microsoft Speech SDK on your computer.

 

Requirements

  • LabVIEW 2012 (or compatible)
  • Microsoft Speech Object Library, which can be downloaded here. You just need to download the "SpeechSDK51.exe" option and run setup.exe.

 

Steps to Implement or Execute Code

  1. Set the text to be spoken in the front panel string control
  2. Run the VI

 

Additional Information or References

VI Block Diagram

 

Text To Speech LV 2012 NI Verified.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
smikel
NI Employee (retired)
on

Be careful to choose "Microsoft - Anna" as the voice to use. Other voices caused an error on my system.

Salvador Mikel
National Instruments
Ingeniería de Aplicaciones
www.ni.com/soporte
uri78mx
Member
Member
on

You need to change 1 instead 3 in the for loop.

Almost all windows has only 1 voice, no 3.

nely
Member
Member
on

podrias explicar el funcionamiento del programa, gracias desde ahora por la respuesta

uri78mx
Member
Member
on

1 abres la libreria de voces con un Automation Refnum desde el panel frontal y seleccionas el ActiveX Class SpeechLib.ISpeechVoice

2 Usas un Automation Open y un Invoke Node para revisar cuantas voces hay disponibles en la libreria de tu computadora ( de 0 a 2)

3 Las voces disponibles se graban en el boton CHOOSE A VOICE

4 Tu seleccionas una voz usando el mismo boton

5 Finalmente se lee el texto que este en TEXT TO BE SPOKEN

Recomendacion, rompe el string del error para que tu programa funcioneNueva imagen (11).bmp, al menos saliendo del for loop.

nely
Member
Member
on

Gracias!! fuciona muy bien ahora si lo voy a ver con detenimiento

jaya2712
Member
Member
on

Excellent....!

hichem55
Member
Member
on

good job! helped me a lot