Пример #1
0
        public ASRApi BuildASR()
        {
            if (_settings == null)
            {
                throw new Exception("App setting can not null.");
            }
            if (string.IsNullOrEmpty(_language))
            {
                throw new Exception("Language set can not null.");
            }
            Model.IAT.CommonParams common = new Model.IAT.CommonParams()
            {
                app_id = _settings.AppID,
                uid    = _uid,
            };
            Model.IAT.DataParams data = new Model.IAT.DataParams()
            {
                format   = _format,
                encoding = _encoding
            };
            Model.IAT.BusinessParams business = new Model.IAT.BusinessParams()
            {
                language = _language,
                domain   = _domain,
                accent   = _accent,
                vad_eos  = _vad_eos,
            };
            _settings.ApiType = Enum.ApiType.ASR;

            ASRApi api = new ASRApi(_settings, common, data, business);

            api.OnError   += _onError;
            api.OnMessage += _onMessage;
            return(api);
        }
Пример #2
0
 public LastFrameData()
 {
     data        = new DataParams();
     data.status = FrameState.Last;
 }
Пример #3
0
 public ContinueFrameData()
 {
     data = new DataParams();
 }