Simple C # text-to-speech

Source: Internet
Author: User

After Microsoft completes the process, C # has many parameters for text-to-speech conversion. After all, I am also a beginner. I would like to share with you the simplest method, so you have to figure out the best results;

Add and reference the system. Speech Assembly first;

Using system; using system. speech. synthesis; namespace consoleapplication2 {class program {static void main (string [] ARGs) {speechsynthesizer Hello = new speechsynthesizer (); string STR = "enter your name"; Hello. speak (STR); // speak (string). The speak is added with the string-type parameter console. readkey ();}

I personally think that in some cases, it is just a matter of direct emphasis. What we need is this simple and rude.

Although it is a simple code, multi-segment superposition is not enough. I personally think programming is to do the most with the least code.

Simple code and different ideas have different effects.

Using system; using system. speech. synthesis; namespace consoleapplication2 {class program {static void main (string [] ARGs) {/* the following program does not support English. I just got in touch with it. I still don't understand English, haha */speechsynthesizer Hello = new speechsynthesizer (); string STR = "enter your name"; console. writeline (STR); Hello. speak (STR); string input = console. readline (); console. writeline ("hello," + input); Hello. speak ("hello," + input); STR = "I'm your assistant, glad to meet you"; console. writeline (STR); Hello. speak (STR); console. readkey ();}}}

This is my first blog post. Please forgive me for writing poorly. If you have any mistakes, please correct them. Thank you!

 

Simple C # text-to-speech

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: info-contact@alibabacloud.com 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.