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 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; }
/// <summary> /// 开始建立与服务端的连接(异步的方式),可通过注册 OnInitialized 事件来通知客户端是否已完成初始化 /// </summary> public void ConnectAsync() { _asr.Initialize(); }