public void Tts()
{
// 可选参数
var option = new Dictionary
{
{"spd", 5}, // 语速
{"vol", 7}, // 音量
{"per", 4} // 发音人,4:情感度丫丫童声
};
var result = _ttsClient.Synthesis("众里寻他千百度", option);
if (result.ErrorCode == 0) // 或 result.Success
File.WriteAllBytes("合成的语音文件本地存储地址.mp3", result.Data);
}
asp.net core项目,调用tts服务,上述代码中,result 返回以下错误
{"err_detail":"Content!","err_msg":"parameter error.","err_no":501,"err_subcode":50000,"tts_logid":1545101368}
收藏
点赞
0
个赞
请登录后评论
TOP
切换版块
ok 解决了就好。话说asp.net不能用c#的nuget包么
不是appkey与secretkey的问题,.net core下兼容性问题,查看.net corefx源代码
.net core GetRequestStream()使用同步调用方法调用异步方法InternalGetRequestStream(),导致参数传值问题
请确认你的AK&SK 双钥准确无误 就是你的_ttsClient