修复了语音识别一个不太聪明的bug

This commit is contained in:
Windpicker-owo
2025-08-01 15:30:35 +08:00
parent 75689d760d
commit b79faf8f86
2 changed files with 2 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ async def get_voice_text(voice_base64: str) -> str:
logger.warning("语音识别未启用,无法处理语音消息")
return "[语音]"
try:
_llm = LLMRequest(model_set=model_config.model_task_config.voice, request_type="voice")
_llm = LLMRequest(model_set=model_config.model_task_config.voice, request_type="audio")
text = await _llm.generate_response_for_voice(voice_base64)
if text is None:
logger.warning("未能生成语音文本")

View File

@@ -276,7 +276,7 @@ class LLMRequest:
extra_params=model_info.extra_params,
)
elif request_type == RequestType.AUDIO:
assert message_list is not None, "message_list cannot be None for audio requests"
assert audio_base64 is not None, "audio_base64 cannot be None for audio requests"
return await client.get_audio_transcriptions(
model_info=model_info,
audio_base64=audio_base64,