明确语音传输格式
This commit is contained in:
@@ -46,7 +46,7 @@ public class WhisperClient {
|
||||
.setType(MultipartBody.FORM)
|
||||
.addFormDataPart("model", MODEL)
|
||||
.addFormDataPart("file", audioFile.getName(),
|
||||
RequestBody.create(audioFile, MediaType.parse("audio/*")));
|
||||
RequestBody.create(audioFile, MediaType.parse("audio/webm")));
|
||||
// 添加可选参数
|
||||
if (options != null) {
|
||||
for (Map.Entry<String, String> entry : options.entrySet()) {
|
||||
@@ -69,8 +69,6 @@ public class WhisperClient {
|
||||
", 详情: " + responseBody
|
||||
);
|
||||
}
|
||||
// 解析JSON响应
|
||||
JSONObject json = new JSONObject(responseBody);
|
||||
return responseBody;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user