资源简介
阿里云语音服务demo,简化官网demo,改下配置可以直接用
代码片段和文件信息
package message.demo;
import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.dyvmsapi.model.v20170525.SingleCallByTtsRequest;
import com.aliyuncs.dyvmsapi.model.v20170525.SingleCallByTtsResponse;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
public class VoiceDemo {
// 云通信产品-语音API服务产品名称(产品名固定,无需修改)
static final String product = “Dyvmsapi“;
// 产品域名(接口地址固定,无需修改)
static final String domain = “dyvmsapi.aliyuncs.com“;
// AK信息
static final String accessKeyId = “LTAI1pjHEjVWmzhs“;
static final String accessKeySecret = “Kf9ukSKVk8BWWa1cwGdb7ylZPLhHLG“;
public static SingleCallByTtsResponse sendCVoice() throws ClientException{
//设置访问超时时间
评论
共有 条评论