mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-13 16:53:24 +00:00
fix: asr
This commit is contained in:
@ -86,7 +86,6 @@ class ASR(Blackbox):
|
||||
data = args[0]
|
||||
|
||||
if user_model_name == 'sensevoice' or ['sensevoice']:
|
||||
# 创建一个临时文件
|
||||
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as temp_audio_file:
|
||||
temp_audio_file.write(data)
|
||||
temp_audio_path = temp_audio_file.name
|
||||
@ -130,7 +129,7 @@ class ASR(Blackbox):
|
||||
|
||||
if isinstance(setting, str):
|
||||
try:
|
||||
setting = json.loads(setting) # 尝试将字符串转换为字典
|
||||
setting = json.loads(setting) #str covert to dict
|
||||
except json.JSONDecodeError:
|
||||
return JSONResponse(content={"error": "Invalid settings format"}, status_code=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user