该篇主要讲腾讯口语评测,可以去腾讯云上查看官方文档:https://cloud.tencent.com/document/product/884/19309
主要有两个步骤:
1.发音评估初始化
2.发音数据传输接口
/**
* 单词测评
* @param word 单词
* @param audio 文件路径
* @return
*/
public static TransmitOralProcessResponse soe(String word,String audio){
try {
/* 发音评估初始化 */
// 实例化一个认证对象,入参需要传入腾讯云账户secretId,secretKey
Credential cred = new Credential("*****", "*****");
// 实例化一个http选项,可选的,没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setReqMethod("GET"); // post请求(默认为post请求)
httpProfile.setConnTimeout(30); // 请求连接超时时间,单位为秒(默认60秒)
httpProfile.setEndpoint("soe.tencentcloudapi.com"); // 指定接入地域域名(默认就近接入)
String number = Utils.getOrderNumber();
// 实例化要请求产品的client对象,clientProfile是可选的
SoeClient client = new SoeClient(cred, &#
英语口语评测JAVA
最新推荐文章于 2024-11-28 15:37:50 发布