zoukankan      html  css  js  c++  java
  • c# 朗读文字

    添加引用 System.Speech
    try
                {
                    SpeechRecognitionEngine recEngine = new SpeechRecognitionEngine();
                    SpeechSynthesizer speech = new SpeechSynthesizer();
                    speech.Rate = 1;//速度
                    speech.Volume = 100;//音量,0-100
                    speech.SpeakAsync("欢迎使用电力安全工器具集约化智能管控系统");//异步播放
                    Thread.Sleep(2000);
                    speech.SpeakAsyncCancelAll();//停止前面的所有播放
                    speech.SpeakAsync("中华人民共和国");//异步播放,但是要等到前面的发音完成后才会播放该发音
                    speech.Speak(@"下图可编为CI(156段)+CF(201段),其中CI段只包括一段默认半径的纯圆弧,CF由CI圆弧延长至R201和R201以后的两段折线组成。
                    也可编为 CR + CF,CR的C代表156,R代表R201方位线,CR由一段默认半径的圆弧和延长至R201的折线组成,CF只包含R201方向的直线。
                    还可编为CI + IF + TF,与第一种的CI一样,只是将CF由IF + TF代替");
                    speech.Speak("中华人民共和国");
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                }
  • 相关阅读:
    HDU 1269 迷宫城堡
    HDU 4771 Stealing Harry Potter's Precious
    HDU 4772 Zhuge Liang's Password
    HDU 1690 Bus System
    HDU 2112 HDU Today
    HDU 1385 Minimum Transport Cost
    HDU 1596 find the safest road
    HDU 2680 Choose the best route
    HDU 2066 一个人的旅行
    AssetBundle管理机制(下)
  • 原文地址:https://www.cnblogs.com/mol1995/p/13424679.html
Copyright © 2011-2022 走看看