资源简介
讯飞语音实时在线识别,百度语音实时在线识别

代码片段和文件信息
using NAudio.Wave;
using SoundToTextDemo.Model;
using SoundToTextDemo.Utility;
using System;
using System.Collections.Concurrent;
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;
namespace SoundToTextDemo
{
public partial class BaiDuMainForm : Form
{
private WaveIn wis = null;
private WaveFormat pcmconfig = null;
private bool pullmark = false;
///
/// 语音队列
///
private static readonly ConcurrentQueue cq = new ConcurrentQueue();
//当前的互斥锁
private static readonly Testcode code = new Testcode();
private static object mutext = new object();
public BaiDuMainForm()
{
InitializeComponent();
int audio_rate = 16000;// 设置成8000会出现不是说话的内容
int audio_byte = 16;
int audio_channle = 1;
this.pcmconfig = new WaveFormat(audio_rate audio_byte audio_channle);
if (this.wis == null)
{
this.wis = new WaveIn();
}
this.wis.DataAvailable += wis_DataAvailable;
}
private void wis_DataAvailable(object sender WaveInEventArgs e)
{
if (e.Buffer != null && e.BytesRecorded > 0)
{
cq.Enqueue(e.Buffer);
}
}
private void btn_start_Click(object sender EventArgs e)
{
try
{
btn_start.Enabled = false;
btn_stop.Enabled = true;
this.wis.DeviceNumber = 0;
this.wis.WaveFormat = this.pcmconfig;
this.wis.BufferMilliseconds = 6000;
// this.bytelength = (uint)((float)(audio_rate * (audio_byte / 8)) * ((float)this.wis.BufferMilliseconds / 1000f));
this.wis.StartRecording();
pullmark = true;
Task.Factory.StartNew(() =>
{
while (pullmark)
{
if (!cq.IsEmpty)
{
ReciveDataModel redata = null;
byte[] localValue;
cq.TryDequeue(out localValue);
DataSendModel model = new DataSendModel(DataEnum.FormatEnum.wav 16000 ConfigHelper.Instance.Token Guid.NewGuid().ToString(“N“));
model.len = (int)localValue.Length;
model.speech = Convert.Tobase64String(localValue);
string poststr = Newtonsoft.Json.JsonConvert.Serializeobject(model);
string str = code.GetResponseStr(ConfigHelper.Instance.ApiUrl poststr);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 497 2016-09-21 11:57 SoundToTextDemo\SoundToTextDemo\App.config
文件 4588 2016-09-21 14:17 SoundToTextDemo\SoundToTextDemo\BaiDuMainForm.cs
文件 6385 2016-06-17 16:36 SoundToTextDemo\SoundToTextDemo\BaiDuMainForm.Designer.cs
文件 5817 2016-06-17 16:36 SoundToTextDemo\SoundToTextDemo\BaiDuMainForm.resx
文件 6238674 2016-09-21 11:22 SoundToTextDemo\SoundToTextDemo\bin\Debug\msc.log
文件 10484951 2016-06-17 17:01 SoundToTextDemo\SoundToTextDemo\bin\Debug\msc_2016617_1713.log
文件 10484934 2016-09-20 15:29 SoundToTextDemo\SoundToTextDemo\bin\Debug\msc_2016920_152927.log
文件 140 2016-09-21 11:22 SoundToTextDemo\SoundToTextDemo\bin\Debug\msc_assist.dat
文件 364544 2015-04-13 09:51 SoundToTextDemo\SoundToTextDemo\bin\Debug\msc_old.dll
文件 471040 2016-06-17 14:02 SoundToTextDemo\SoundToTextDemo\bin\Debug\NAudio.dll
文件 940967 2016-06-17 14:02 SoundToTextDemo\SoundToTextDemo\bin\Debug\NAudio.xm
文件 485888 2016-06-17 14:02 SoundToTextDemo\SoundToTextDemo\bin\Debug\Newtonsoft.Json.dll
文件 516075 2016-06-17 14:02 SoundToTextDemo\SoundToTextDemo\bin\Debug\Newtonsoft.Json.xm
文件 44544 2016-09-21 12:21 SoundToTextDemo\SoundToTextDemo\bin\Debug\SoundToTextDemo.exe
文件 497 2016-09-21 11:57 SoundToTextDemo\SoundToTextDemo\bin\Debug\SoundToTextDemo.exe.config
文件 108032 2016-09-21 12:21 SoundToTextDemo\SoundToTextDemo\bin\Debug\SoundToTextDemo.pdb
文件 24224 2016-09-21 12:21 SoundToTextDemo\SoundToTextDemo\bin\Debug\SoundToTextDemo.vshost.exe
文件 497 2016-09-21 11:57 SoundToTextDemo\SoundToTextDemo\bin\Debug\SoundToTextDemo.vshost.exe.config
文件 490 2015-11-13 10:24 SoundToTextDemo\SoundToTextDemo\bin\Debug\SoundToTextDemo.vshost.exe.manifest
文件 278528 2015-04-14 20:14 SoundToTextDemo\SoundToTextDemo\bin\Debug\speex.dll
文件 1099666 2016-06-17 17:01 SoundToTextDemo\SoundToTextDemo\bin\Debug.rar
文件 471040 2016-06-17 14:02 SoundToTextDemo\SoundToTextDemo\bin\Release\NAudio.dll
文件 940967 2016-06-17 14:02 SoundToTextDemo\SoundToTextDemo\bin\Release\NAudio.xm
文件 485888 2016-06-17 14:02 SoundToTextDemo\SoundToTextDemo\bin\Release\Newtonsoft.Json.dll
文件 516075 2016-06-17 14:02 SoundToTextDemo\SoundToTextDemo\bin\Release\Newtonsoft.Json.xm
文件 42496 2016-09-21 14:14 SoundToTextDemo\SoundToTextDemo\bin\Release\SoundToTextDemo.exe
文件 497 2016-09-21 11:57 SoundToTextDemo\SoundToTextDemo\bin\Release\SoundToTextDemo.exe.config
文件 85504 2016-09-21 14:14 SoundToTextDemo\SoundToTextDemo\bin\Release\SoundToTextDemo.pdb
文件 24216 2016-09-21 14:16 SoundToTextDemo\SoundToTextDemo\bin\Release\SoundToTextDemo.vshost.exe
文件 497 2016-09-21 11:57 SoundToTextDemo\SoundToTextDemo\bin\Release\SoundToTextDemo.vshost.exe.config
............此处省略88个文件信息
- 上一篇:污水处理PLC控制系统及组态王显示
- 下一篇:8路抢答器设计八路智力竞赛抢答器
相关资源
- DSP 语音识别程序 DTW MFCC
- 特定人语音识别技术在汽车控制上的
- labview语音识别程序
- DTW语音识别算法
- 龙邱SYN7318非特定语音识别模块程序
- WFST-decoder
- 基于GEC210的语音识别控制
- 自动语音识别
- 语音识别系统源程序
- hbr640语音识别播放模块驱动
- VS2017环境集成百度语音识别API工程
- Spoken_Language_Processing微软黄学东
- 百度语音识别node服务器版demo
- CMU汉语普通话语音识别发音词典含多
- opensmile官方文档及对应语音特征的计
- Labview语音识别
- unity语音识别Word Detection
- 语音识别_STC_SNR6812 / SNR3512_UART.rar
- FUNDAMENTALS OF SPEECH RECOGNITION(语音识别
- kaldi入门资料整理
- 孤立词0-9的语音识别代码+报告
- LD3320语音识别
- kaldi中文资料_v0.4和thch30学习笔记.zi
- HTKbook-3.5版本,增加DNN识别
- 语音识别算法
- 语音识别代码
- kaldi的全部资料第二版
- 基于DSP的语音识别技术研究及实现
- 百度语音识别与语音合成官方demo
- Spoken Language Processing-A Guide黄学东
评论
共有 条评论