From 4f918b91c7ec2489d39cd3911b1e93bb88caf5ca Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 14 Oct 2025 23:28:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E6=96=87=E4=BB=B6=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/vetti/socket/ChatWebSocketHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vetti-admin/src/main/java/com/vetti/socket/ChatWebSocketHandler.java b/vetti-admin/src/main/java/com/vetti/socket/ChatWebSocketHandler.java index 1213e7c..f6a92c4 100644 --- a/vetti-admin/src/main/java/com/vetti/socket/ChatWebSocketHandler.java +++ b/vetti-admin/src/main/java/com/vetti/socket/ChatWebSocketHandler.java @@ -80,7 +80,7 @@ public class ChatWebSocketHandler { byteBuffer.get(bytes); log.info("2、运行时间:{}",System.currentTimeMillis()/1000); // 生成唯一文件名 - String fileName = clientId + "_" + System.currentTimeMillis() + ".opus"; + String fileName = clientId + "_" + System.currentTimeMillis() + ".webm"; String pathUrl = RuoYiConfig.getProfile()+VOICE_STORAGE_DIR + fileName; // String pathUrl = "/Users/wangxiangshun/Desktop/0.8733346782733291.webm"; log.info("文件路径为:{}", pathUrl); @@ -153,8 +153,8 @@ public class ChatWebSocketHandler { } // 确保文件以.webm结尾 - if (!filePath.toLowerCase().endsWith(".opus")) { - filePath += ".opus"; + if (!filePath.toLowerCase().endsWith(".webm")) { + filePath += ".webm"; } FileOutputStream fos = null;