Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7852221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:22:13+00:00 2026-06-02T19:22:13+00:00

i am trying to highlight words read by the text to speech but its

  • 0

i am trying to highlight words read by the text to speech but its not working. until now i made:

    string startSpan = "<span style=" + "background-color:Yellow" + ">";
    string endSpan = "</span>";

 //button onclick
protected void speak_Hope(object sender, EventArgs e)
    {
            speaker.Rate = -4;
            speaker.SpeakAsync(announce.InnerText);
            speaker.SpeakProgress += new EventHandler<SpeakProgressEventArgs>    (speaker_SpeakProgress);
            System.Diagnostics.Debug.WriteLine("processing");

    }


void speaker_SpeakProgress(object sender, SpeakProgressEventArgs  e)
    {
        counter2 = e.CharacterPosition - 10;
        counter3 = e.Text.Length;
        counter4 = counter2 + counter3;
        System.Diagnostics.Debug.WriteLine(e.CharacterPosition - 10 + " next one" + e.Text);
        announce.InnerHtml = announce.InnerText.Substring(0, counter2) + startSpan + announce.InnerText.Substring(counter2, counter3) + endSpan + announce.InnerText.Substring( announce.InnerText.Length - 1);


    }

am i doing it right or is there any other way, can it be done in a javascript manner?
thanks alot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:22:13+00:00Added an answer on June 2, 2026 at 7:22 pm

    In the case you are looking for text to speech this is a possible duplicate of this Stackoverflow Question. That question provides the suggestion of using WebAnywhere, this provides speech to text without any additional downloads or special software. Pretty cool!

    However, it seems like you are actually looking to achieve speech recognition. Based on your code you are heading down the wrong rabbit hole. You are not going to be able to use the Microsoft Speech libraries to accomplish this goal (short on embedding them in an XBAP) and this is a result of them running on the server and not on the client side.

    There are some Flash and Java based solutions that will indeed allow for client side voice recognition. I suggest you explore them because I believe they achieve what you’re looking for.

    1) Speech API – Open source and their website includes a range of demos that I found to work quite well.
    2) wami – Also open source

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to highlight all matching word inside the body but not words inside
I am trying to create a text highlight option for my website. But I
I'm trying to highlight a text in the html string by using Html Agility
I am trying to highlight results in Solr and up until now, it's been
I'm trying to write a Google chrome extension so that I can highlight text
I am trying to develop a cocoa application that requires to read highlighted text
I'm trying to highlight the text that matches the query in a live search
Im trying to highlight words, letters or anything marked in a Regular Expression. Im
I am implementing a website search and am trying to highlight the words the
In the below script I am trying to highlight all the words in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.