首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >腾讯云一句话识别返回识别不了?

腾讯云一句话识别返回识别不了?

提问于 2019-01-24 17:36:30
回答 1关注 0查看 486

我用事例的语音文件都识别不了

音频文件:http://liqiansunvoice-1255628450.cosgz.myqcloud.com/demo.mp3

代码:

代码语言:javascript
复制
Credential cred = new Credential(TXYUNAPI_SECRET_ID, TXYUNAPI_SECRET_KEY);

HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("aai.tencentcloudapi.com");
httpProfile.setReqMethod("GET");

ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);

AaiClient client = new AaiClient(cred, "ap-shanghai", clientProfile);

JSONObject json = new JSONObject();
json.put("ProjectId", 0);
json.put("SubServiceType", 2);
json.put("EngSerViceType", "8k");
json.put("SourceType", 0);
json.put("VoiceFormat", "mp3");
json.put("UsrAudioKey", UUID.randomUUID().toString());
json.put("Url", mp3Url);
String params = json.toJSONString();
SentenceRecognitionRequest req = SentenceRecognitionRequest.fromJsonString(params, SentenceRecognitionRequest.class);

SentenceRecognitionResponse resp = client.SentenceRecognition(req);

System.out.println(SentenceRecognitionRequest.toJsonString(resp));

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档