public Form1() { InitializeComponent(); asr = new ucAsr() { Dock = DockStyle.Fill }; tabPage1.Controls.Add(asr); mt = new ucMt() { Dock = DockStyle.Fill }; tabPage2.Controls.Add(mt); ucTts tts = new ucTts() { Dock = DockStyle.Fill }; tabPage3.Controls.Add(tts); IAsr _asr = AsrProxy.AsrFun.GetAsr(); _asr.OnInitialized += _asr_OnInitialized; _asr.Initialize(); }
public ucAsr() { InitializeComponent(); panel2.Enabled = false; // 1) 获取 Asr 语音识别功能接口 _asr = AsrLibrary.AsrFun.GetAsr(); }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { if (_asr != null) { _asr.Dispose(); _asr = null; } }
public SimpleAudioPanel() { InitializeComponent(); _progressBar1.Visible = false; _asr = AsrLibrary.AsrFun.GetAsr(); _asr.OnInitialized += _asr_OnInitialized; _asr.Initialize(); dtWav.Columns.Add("FileName", typeof(string)); dtWav.Columns.Add("Frequency", typeof(string)); dtWav.Columns.Add("RecordTime", typeof(DateTime)); dtWav.Columns.Add("AsrResult", typeof(string)); dtWav.Columns.Add("Illegal", typeof(string)); dataGridView1.DataSource = dtWav; txtPath.Text = AppDomain.CurrentDomain.BaseDirectory; }
public AsrRouter(IRoutingConfiguration routingConfiguration, IAsr asr) { this.routingConfiguration = routingConfiguration; this.asr = asr; }
/// <summary> /// 构造函数 /// </summary> /// <param name="ip">语音识别服务器 IP 地址</param> /// <param name="port">语音识别服务器 端口</param> public AsrClient(string ip, int port) { _asr = AsrFun.GetInstance(ip, port); _translate = (ITranslate)_asr; _asr.OnInitialized += _asr_OnInitialized; }