Ejemplo n.º 1
0
        public TTSApi BuildTTS()
        {
            if (_settings == null)
            {
                throw new Exception("App setting can not null.");
            }
            Model.TTS.CommonParams common = new Model.TTS.CommonParams()
            {
                app_id = _settings.AppID,
                uid    = _uid,
            };
            Model.TTS.DataParams data = new Model.TTS.DataParams()
            {
                text = "",
            };
            Model.TTS.BusinessParams business = new Model.TTS.BusinessParams()
            {
                ent    = _ent,
                aue    = _aue,
                auf    = _auf,
                vcn    = _vcn,
                speed  = _speed,
                volume = _volume,
                tte    = _tte
            };
            _settings.ApiType = Enum.ApiType.TTS;

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

            api.OnError   += _onError;
            api.OnMessage += _onMessage;
            return(api);
        }
Ejemplo n.º 2
0
        public TTSApi BuildTTS()
        {
            Model.TTS.DataParams data = new Model.TTS.DataParams()
            {
                aue         = _aue,
                auf         = _auf,
                voice_name  = _voiceName,
                speed       = _speed,
                volume      = _volume,
                engine_type = _engineType,
                save_path   = _savePath
            };
            TTSApi api = new TTSApi(_settings, data);

            api.OnError += _onError;
            return(api);
        }