private void InitTTSConfig() { TTSConfig = new MTTSConfig(); TTSConfig.speed = 1.0; TTSConfig.volume = 80; TTSConfig.useSSML = 0; }
private void GetPCMData() { MTTSConfig config = new MTTSConfig(); config.speed = sld_Speed.Value; config.volume = PublicFunction.intParse(sld_Volumn.Value); config.useSSML = 0; string ttsResConfig = JsonHelper.ToJson(manager.TTSResConfig); int result = DUILiteHelper.DUILiteNativeTTSNew(ttsResConfig); //string ttsstartparam = "{\"speed\":1.0,\"volume\":80,\"useSSML\":0}"; string ttsConfig = JsonHelper.ToJson(config); result = DUILiteHelper.DUILiteNativeTTSStart(ttsConfig); string text = string.Empty; if (string.IsNullOrEmpty(tb_TTSText.Text)) { text = "明天苏州的天气怎么样"; } else { text = tb_TTSText.Text; } byte[] bytes = Encoding.UTF8.GetBytes(text); App.IsNewTTS = true; result = DUILiteHelper.DUILiteNativeTTSFeed(bytes); result = DUILiteHelper.DUILiteNativeTTSRelease(); }