• 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);
                }
  • 相关阅读:
    [LeetCode] Construct Binary Tree from Inorder and Pretorder Traversal
    [LeetCode] Construct Binary Tree from Inorder and Postorder Traversal
    [LeetCode] Candy
    [LeetCode] Next Permutation
    [LeetCode] Permutation Sequence
    [LeetCode] Permutations II
    【转载pku】三十分钟掌握STL
    [LeetCode] Permutations
    【附论文】Facebook推面部识别软件 精准度高达97.25%
    【转载】limits.h
  • 原文地址:https://www.cnblogs.com/mol1995/p/13424679.html
Copyright © 2020-2023  润新知