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