/// <summary> /// 腾讯语音合成(优图) /// </summary> /// <param name="text">文字内容</param> /// <param name="speaker">普通话男声1 静琪女声5 欢馨女声6 碧萱女声7</param> /// <param name="speed">语速,默认为100,取值范围[50, 200]</param> /// <param name="format">1-PCM 2-WAV 3-MP3</param> /// <returns></returns> public static BaseResp <Aai_TtsResp> Tts(string text, int speaker = 7, int speed = 100, int format = 2) { Aai_TtsRequest req = new Aai_TtsRequest { text = text, speaker = speaker, speed = speed, format = format }; req.sign = Utils.Sign(req, _apiKey); return(HttpUtils.Get <BaseResp <Aai_TtsResp> >(Utils.getAaiUrl() + "?" + Utils.Parameter(req))); }
public static string Aai_Tts(Aai_TtsRequest request) { var uri = "https://api.ai.qq.com/fcgi-bin/aai/aai_tts"; return(Aid.Request(request, uri, "GET")); }