Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Form1.cs
Package: speech.rar [view]
Upload User: cookies0
Upload Date: 2022-07-28
Package Size: 284k
Code Size: 2k
Category:
Speech/Voice recognition/combine
Development Platform:
Visual C++
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- using SpeechLib;
- namespace tryreco
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void button1_Click(object sender, EventArgs e)
- {
- SpRecognition cc = new SpRecognition();
- cc.MessageBegin();
- cc.BeginRec(textBox1); //Fan:把内容输入textbox1
- }
- private void button2_Click_1(object sender, EventArgs e)
- {
- SpRecognition cc = new SpRecognition();
- cc.MessageEnd();
- cc.CloseRec();
- }
- private void button3_Click(object sender, EventArgs e)
- {
- SpVoiceClass voice = new SpVoiceClass();
- voice.Voice = voice.GetVoices(string.Empty, string.Empty).Item(3);
- voice.Speak(textBox1.Text, SpeechVoiceSpeakFlags.SVSFDefault); ;
- }
- private void button4_Click(object sender, EventArgs e) //把语音转化成 .wav格式
- {
- //Declare the SpVoice object.
- ISpeechVoice v = new SpVoiceClass();
- //Create a wave stream
- SpFileStream s = new SpFileStream();
- //Create a new .wav file for writing.
- s.Open("out.wav", SpeechStreamFileMode.SSFMCreateForWrite, false);
- //Set the .wav file stream as the output for the Voice object
- v.AudioOutputStream = s;
- //Call the Speak method now will send the output to the .wav file.
- v.Speak(textBox1.Text, SpeechVoiceSpeakFlags.SVSFDefault);
- //Close the file
- s.Close();
- }
- private void button5_Click(object sender, EventArgs e)
- {
- Speach Hunhe = new Speach();
- Hunhe.AnalyseSpeak(textBox1.Text);
- }
- }
- }