c#语音报读
来源:互联网 发布:手机端口查询 编辑:程序博客网 时间:2024/05/21 08:00
最近在写程序的时候用到了语音报读的模块,在c++中使用TTS可以实现,但是有点麻烦,在使用c#时,发现直接添加引用就可以了。
1.添加引用,如下图所示:
2.在程序中添加 引用:
3.在窗体初始化的同时,另开一个线程异步报读文本:
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;using System.Speech.Synthesis;using System.Threading;using System.IO;using System.Diagnostics;namespace ScannerGun{ public partial class Form1 : Form { public Form1() { InitializeComponent(); Thread thread = new Thread(Voice); thread.IsBackground = true; thread.Start(); } public void Voice() { SpeechSynthesizer speech = new SpeechSynthesizer(); speech.Speak("即将进行扫描枪的测试,请根据页面提示进行扫描,然后检测扫描结果是否正确,正确则点击测试成功按钮,错误则点击测试失败按钮"); } }}
阅读全文
0 0
- c#语音报读
- C#语音朗读
- C#语音朗读
- C#语音朗读
- C#语音朗读
- C#语音朗读
- C#实现语音技术
- C# 语音技术
- c# 语音功能入门
- C# 语音聊天系统
- C#语音实现
- C# 语音开发
- C#语音实现
- c#实现语音功能
- C#操作语音控制程序
- C#实现语音识别
- c#语音朗读类
- c# 语音功能入门
- stderr 、stdout 选择性保存
- JDBC插入数据返回生成的主键ID
- listview-requsetdata
- Java的几种常用排序算法分析
- 云客Drupal8源码分析之字段API(中)
- c#语音报读
- 浮点数比较大小,是否相等
- FCN网络的训练——以SIFT-Flow 数据集为例
- 最小堆JAVA(Top K问题)
- Xtend官方文档-第一部分
- 文件目录操作--cookbook读书笔记
- 信奥竞赛体会
- Mysql SQL Mode
- Shared Element效果