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

  • SEARCH
  • Home
  • 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 450731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:53:53+00:00 2026-05-12T21:53:53+00:00

I seek some insight in creating an application that converts text to speech in

  • 0

I seek some insight in creating an application that converts text to speech in ASP.NET. From my initial research, it appears that:

  1. MS SAPI requires the client to download an ActiveX component and can support large amounts of text to be converted. Our clients are not willing to install any components on their systems, so this approach may or may not fly.

  2. I do understand with .NET 3.0, we have the System.Speech.Synthesis namespace. Does the conversion take place on the server? If so, how would I serve it to the client?

Our requirements are ability to convert large amount of text, should be scalable and reliable. Which technology is “production ready” capable of serving a large number of requests in a short time interval.

Any thoughts are appreciated.

  • 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-05-12T21:53:54+00:00Added an answer on May 12, 2026 at 9:53 pm

    By default, ASP.Net applications don’t run with sufficient permissions to access Speech Synthesis, and attempting to run Larsenal’s code will fail with a security error.

    I was able to get around this in an app by having a separate WCF service running on the server, as a regular Windows Service. The ASP.Net application then communicated with that service. That service just wrapped Larsenal’s code, returning an array of bytes, given a string of text.

    Also, one megabyte of text? That’s a good-sized novel.

    Edit, 11-12-09, answering some comments:

    System.Speech can either return an array of bytes, or save to a wav file, which you can then feed to a media player embedded on the user’s page. When I built my talking web page, it worked like this:

    1) Page.aspx includes an ’embed’ tag that puts a Windows Media Player on the page. The source is “PlayText.aspx?Textid=whatever”.
    2) PlayText.aspx loads the appropriate text, and communicates (via WCF) to the speechreader service, handing it the text to read.
    3) The Speechreader service creates a MemoryStream and calls SpeechSynthesiser.SetOutputToWaveStream, and then returns the stream as a single array of bytes. This array is Response.Write()-ed to the client.

    Here’s the meat of the SpeechReader service:

        byte[] ITextReader.SpeakText(string text)
        {
            using (SpeechSynthesizer s = new SpeechSynthesizer())
            {
                using (MemoryStream ms = new MemoryStream())
                {
                    s.SetOutputToWaveStream(ms);
                    s.Speak(text);
                    return ms.GetBuffer();
                }
            }
        }
    

    I’m pretty sure that on the back end, this returns an enormous XML array-of-bytes, and is horribly inefficient. I just did it as a proof of concept, and so didn’t research that. If you intend to use this in production, make sure that it’s not internally returning something like this:

    <byte>23</byte>
    <byte>42</byte>
    <byte>117</byte>
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.