处理语音转文字返回状态
This commit is contained in:
@@ -36,7 +36,7 @@ public class AudioTextRequestClient {
|
||||
if(response.isOk()){
|
||||
String body = response.body();
|
||||
JSONObject jsonObject = JSONObject.parseObject(body);
|
||||
if("0".equals(jsonObject.getString("code"))){
|
||||
if("0".equals(jsonObject.getString("code")) || "200".equals(jsonObject.getString("code"))){
|
||||
return jsonObject.getString("text");
|
||||
}else{
|
||||
throw new RuntimeException("语音转文字接口调用失败: " + jsonObject.getString("error"));
|
||||
|
||||
Reference in New Issue
Block a user