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."); } CommonParams common = new CommonParams() { app_id = _settings.AppID, uid = _uid, }; DataParams data = new DataParams() { format = _format, encoding = _encoding }; BusinessParams business = new BusinessParams() { language = _language, domain = _domain, accent = _accent, }; ASRApi api = new ASRApi(_settings, common, data, business); api.OnError += _onError; api.OnMessage += _onMessage; return(api); }
public TTSApi(AppSettings settings, CommonParams common, DataParams data, BusinessParams business) { _settings = settings; _common = common; _data = data; _business = business; }