From 978f41340aed1db41cfee866a35f328c9e205c29 Mon Sep 17 00:00:00 2001 From: Administrator Date: Sun, 12 Oct 2025 21:46:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=8E=E7=A1=AE=E8=AF=AD=E9=9F=B3=E4=BC=A0?= =?UTF-8?q?=E8=BE=93=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/vetti/common/ai/whisper/WhisperClient.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vetti-common/src/main/java/com/vetti/common/ai/whisper/WhisperClient.java b/vetti-common/src/main/java/com/vetti/common/ai/whisper/WhisperClient.java index 4cfafd7..4d993fd 100644 --- a/vetti-common/src/main/java/com/vetti/common/ai/whisper/WhisperClient.java +++ b/vetti-common/src/main/java/com/vetti/common/ai/whisper/WhisperClient.java @@ -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 entry : options.entrySet()) { @@ -69,8 +69,6 @@ public class WhisperClient { ", 详情: " + responseBody ); } - // 解析JSON响应 - JSONObject json = new JSONObject(responseBody); return responseBody; } }