Click here to Skip to main content
13,051,502 members (55,722 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Dear All,
I need solution for making current word high-lighted being read by SpeackAsync method.
Example:-Robin is a good boy.

in this if SpeakAsync reading at is then is should be highlight.

Plz look at given coding,,,,,,,

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Speech.Synthesis;
using System.IO;
namespace text_to_speech
    public partial class Form1 : Form
        SpeechSynthesizer reader;
        public Form1()
        private void Form1_Load(object sender, EventArgs e)
            reader = new SpeechSynthesizer();
            btnPause.Enabled = false;
            btnResume.Enabled = false;
            btnStop.Enabled = false;
            xtxtContent.ScrollBars = ScrollBars.Both;
            volumebar.Maximum = 100;
            speedbar.Maximum = 10;
            speedbar.Minimum = -5;
            volumebar.Value = 50;
        //SPEAK TEXT
        private void button1_Click(object sender, EventArgs e)
            if (xtxtContent.Text != "")
                reader = new SpeechSynthesizer();
                reader.Volume = volumebar.Value;
                reader.Rate = speedbar.Value;
                label2.Text = "SPEAKING";
                btnPause.Enabled = true;
                btnStop.Enabled = true;
                reader.SpeakCompleted += new EventHandler<SpeakCompletedEventArgs>(reader_SpeakCompleted);
                MessageBox.Show("Please enter some text in the textbox", "Message", MessageBoxButtons.OK);
        void reader_SpeakCompleted(object sender, SpeakCompletedEventArgs e)
            label2.Text = "IDLE";
[Edit]Code block added[/Edit]
Posted 2-Apr-13 21:23pm
Updated 2-Apr-13 21:26pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 3 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100