Beispiel #1
0
        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();
        }
Beispiel #2
0
        public ucAsr()
        {
            InitializeComponent();

            panel2.Enabled = false;
            // 1) 获取 Asr 语音识别功能接口
            _asr = AsrLibrary.AsrFun.GetAsr();
        }
Beispiel #3
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     if (_asr != null)
     {
         _asr.Dispose();
         _asr = null;
     }
 }
Beispiel #4
0
        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;
        }
Beispiel #5
0
 public AsrRouter(IRoutingConfiguration routingConfiguration, IAsr asr)
 {
     this.routingConfiguration = routingConfiguration;
     this.asr = asr;
 }
Beispiel #6
0
 /// <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;
 }