模型调整以及业务流程处理
This commit is contained in:
@@ -61,6 +61,8 @@ public class ChatWebSocketHandler {
|
||||
// 语音结果文件保存目录
|
||||
private static final String VOICE_STORAGE_RESULT_DIR = "/voice_result_files/";
|
||||
|
||||
// 系统语音目录
|
||||
private static final String VOICE_SYSTEM_DIR = "/system_files/";
|
||||
|
||||
public ChatWebSocketHandler() {
|
||||
// 初始化存储目录
|
||||
@@ -83,6 +85,18 @@ public class ChatWebSocketHandler {
|
||||
cacheClientTts.put(clientId,new String());
|
||||
//初始化STT流式语音转换文本的socket链接
|
||||
createWhisperRealtimeSocket(clientId);
|
||||
//发送初始化面试官语音流
|
||||
String openingPathUrl = RuoYiConfig.getProfile() + VOICE_SYSTEM_DIR + "opening.wav";
|
||||
try {
|
||||
//文件转换成文件流
|
||||
ByteBuffer outByteBuffer = convertFileToByteBuffer(openingPathUrl);
|
||||
//发送文件流数据
|
||||
session.getBasicRemote().sendBinary(outByteBuffer);
|
||||
// 发送响应确认
|
||||
log.info("初始化返回面试官语音信息:{}",System.currentTimeMillis()/1000);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ whisper:
|
||||
chatGpt:
|
||||
apiKey: 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
|
||||
apiUrl: https://api.openai.com/v1/chat/completions
|
||||
model: gpt-3.5-turbo
|
||||
model: ft:gpt-3.5-turbo-0125:vetti:construction-labourer-test:CTIvLD5n
|
||||
role: user
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user