feature: 集成bert_vits
This commit is contained in:
1 parent
2b98752db1
commit
c58c7c9a5b
9 files changed
+69
-51
No files matched your search
@@ -122,7 +122,16 @@ async def update_assistant_deatil_params(id: str,request: update_assistant_deati
|
||||
llm_info['temperature'] = request.temperature
|
||||
tts_info['speaker_id'] = request.speaker_id
|
||||
tts_info['length_scale'] = request.length_scale
|
||||
tts_info['language'] = request.language
|
||||
tts_info['style_text'] = request.style_text
|
||||
tts_info['style_weight'] = request.style_weight
|
||||
tts_info['sdp_ratio'] = 0.5
|
||||
tts_info['opt_cut_by_send'] = False
|
||||
tts_info['interval_between_para'] = 1.0
|
||||
tts_info['interval_between_sent'] = 0.2
|
||||
tts_info['en_ratio'] = 1.0
|
||||
user_info['llm_type'] = request.platform
|
||||
user_info['tts_type'] = request.tts_engine
|
||||
assistant.llm_info = json.dumps(llm_info, ensure_ascii=False)
|
||||
assistant.tts_info = json.dumps(tts_info, ensure_ascii=False)
|
||||
assistant.user_info = json.dumps(user_info, ensure_ascii=False)
|
||||
@@ -227,15 +236,7 @@ async def streaming_chat(ws: WebSocket):
|
||||
agent.recorder.input_text = prompt
|
||||
logger.debug("开始调用大模型")
|
||||
llm_frames = await agent.chat(assistant, prompt)
|
||||
|
||||
start_time = time.time()
|
||||
is_first_response = True
|
||||
|
||||
for llm_frame in llm_frames:
|
||||
if is_first_response:
|
||||
end_time = time.time()
|
||||
logger.debug(f"第一帧返回耗时:{round(end_time-start_time,3)}s")
|
||||
is_first_response = False
|
||||
resp_msgs = agent.llm_msg_process(llm_frame)
|
||||
for resp_msg in resp_msgs:
|
||||
llm_text += resp_msg
|
||||
|
||||
Reference in new issue
Block a user