TTS 返回语音优化
This commit is contained in:
@@ -190,7 +190,7 @@ public class ChatWebSocketHandler {
|
||||
byteBuffer.get(bytes);
|
||||
log.info("2、开始接收数据流时间:{}",System.currentTimeMillis()/1000);
|
||||
// 生成唯一文件名
|
||||
String fileName = clientId + "_" + System.currentTimeMillis() + ".webm";
|
||||
String fileName = clientId + "_" + System.currentTimeMillis() + ".wav";
|
||||
String pathUrl = RuoYiConfig.getProfile()+VOICE_STORAGE_DIR + fileName;
|
||||
log.info("文件路径为:{}", pathUrl);
|
||||
log.info("3、开始接收数据流时间:{}",System.currentTimeMillis()/1000);
|
||||
@@ -279,9 +279,9 @@ public class ChatWebSocketHandler {
|
||||
}
|
||||
|
||||
// 确保文件以.webm结尾
|
||||
if (!filePath.toLowerCase().endsWith(".webm")) {
|
||||
filePath += ".webm";
|
||||
}
|
||||
// if (!filePath.toLowerCase().endsWith(".webm")) {
|
||||
// filePath += ".webm";
|
||||
// }
|
||||
|
||||
FileOutputStream fos = null;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user