update:python对接声纹识别优化

This commit is contained in:
3030332422
2025-07-10 15:03:49 +08:00
parent f499040955
commit 2fbee33185
3 changed files with 36 additions and 10 deletions
@@ -118,7 +118,8 @@ class VoiceprintProvider:
result_name = self.speaker_map[speaker_id]["name"]
return result_name
else:
return None
logger.bind(tag=TAG).warning(f"未识别的说话人ID: {speaker_id}")
return "未知说话人"
else:
logger.bind(tag=TAG).error(f"声纹识别API错误: HTTP {response.status}")
return None