TTS 返回语音优化
This commit is contained in:
@@ -190,11 +190,13 @@ public class ChatWebSocketHandler {
|
||||
byteBuffer.get(bytes);
|
||||
log.info("2、开始接收数据流时间:{}",System.currentTimeMillis()/1000);
|
||||
// 生成唯一文件名
|
||||
// String fileName = clientId + "_" + System.currentTimeMillis() + ".webm";
|
||||
// String pathUrl = RuoYiConfig.getProfile()+VOICE_STORAGE_DIR + fileName;
|
||||
// log.info("文件路径为:{}", pathUrl);
|
||||
String fileName = clientId + "_" + System.currentTimeMillis() + ".webm";
|
||||
String pathUrl = RuoYiConfig.getProfile()+VOICE_STORAGE_DIR + fileName;
|
||||
log.info("文件路径为:{}", pathUrl);
|
||||
log.info("3、开始接收数据流时间:{}",System.currentTimeMillis()/1000);
|
||||
try{
|
||||
log.info("文件流的大小为:{}",bytes.length);
|
||||
saveAsWebM(bytes,pathUrl);
|
||||
//接收到数据流后直接就进行SST处理
|
||||
//发送消息
|
||||
WebSocket webSocket = cacheWebSocket.get(clientId);
|
||||
|
||||
Reference in New Issue
Block a user