Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 我想让电脑读一篇短文_C# - Fatal编程技术网

C# 我想让电脑读一篇短文

C# 我想让电脑读一篇短文,c#,C#,我在Windows窗体应用程序C中有一个文本hello world。当窗体打开时,它应该通过计算机用语音说hello world是否易于建议 我没有任何想法,所以我无法在这里编写代码 像 看看: label1.text.read(); // Initialize a new instance of the SpeechSynthesizer. SpeechSynthesizer synth = new SpeechSynthesizer(); // Configure the audio o

我在Windows窗体应用程序C中有一个文本hello world。当窗体打开时,它应该通过计算机用语音说hello world是否易于建议

我没有任何想法,所以我无法在这里编写代码

看看:

label1.text.read();
// Initialize a new instance of the SpeechSynthesizer.
SpeechSynthesizer synth = new SpeechSynthesizer();

// Configure the audio output. 
synth.SetOutputToDefaultAudioDevice();

// Speak a string.
synth.Speak("This example demonstrates a basic use of Speech Synthesizer");