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;