diff --git a/dsLightRag/KeDaXunFei/__pycache__/XunFeiAudioEvaluator.cpython-310.pyc b/dsLightRag/KeDaXunFei/__pycache__/XunFeiAudioEvaluator.cpython-310.pyc index d4b7efa0..97074902 100644 Binary files a/dsLightRag/KeDaXunFei/__pycache__/XunFeiAudioEvaluator.cpython-310.pyc and b/dsLightRag/KeDaXunFei/__pycache__/XunFeiAudioEvaluator.cpython-310.pyc differ diff --git a/dsLightRag/Routes/XunFeiRoute.py b/dsLightRag/Routes/XunFeiRoute.py index bf4cead5..2955275f 100644 --- a/dsLightRag/Routes/XunFeiRoute.py +++ b/dsLightRag/Routes/XunFeiRoute.py @@ -19,7 +19,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from Config.Config import XF_APPID, XF_APIKEY, XF_APISECRET @router.post("/save-audio") -async def save_audio(audio: UploadFile = File(...), txt: str = Form(...)): +async def save_audio(audio: UploadFile = File(...), txt: str = Form(...), language: str = Form("english")): # 添加语言参数,默认英文 """保存音频文件并评分""" temp_file = None try: @@ -59,8 +59,8 @@ async def save_audio(audio: UploadFile = File(...), txt: str = Form(...)): appid=XF_APPID, api_key=XF_APIKEY, api_secret=XF_APISECRET, - audio_file=mp3_temp_file, # 使用转换后的mp3文件 - language="english", + audio_file=mp3_temp_file, + language=language, # 使用动态参数 txt=txt ) results, eval_time = evaluator.run_evaluation() diff --git a/dsLightRag/Routes/__pycache__/XunFeiRoute.cpython-310.pyc b/dsLightRag/Routes/__pycache__/XunFeiRoute.cpython-310.pyc index e287f688..f36c697d 100644 Binary files a/dsLightRag/Routes/__pycache__/XunFeiRoute.cpython-310.pyc and b/dsLightRag/Routes/__pycache__/XunFeiRoute.cpython-310.pyc differ diff --git a/dsLightRag/static/XunFei/audio_evaluation_cn.html b/dsLightRag/static/XunFei/audio_evaluation_cn.html new file mode 100644 index 00000000..806d863c --- /dev/null +++ b/dsLightRag/static/XunFei/audio_evaluation_cn.html @@ -0,0 +1,499 @@ + + +
+ + ++ 录制时间: 0 秒 | + 文件大小: 0 KB +
+