Skip to content

Commit 4c0132a

Browse files
committed
fix: Error thrown when adding voice model
1 parent 98121ad commit 4c0132a

File tree

7 files changed

+8
-4
lines changed

7 files changed

+8
-4
lines changed

apps/models_provider/impl/aliyun_bai_lian_model_provider/credential/stt/asr_stt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def is_valid(self,
3939
return False
4040

4141
try:
42-
model = provider.get_model(model_type, model_name, model_credential)
42+
model = provider.get_model(model_type, model_name, model_credential, **model_params)
4343
model.check_auth()
4444
except Exception as e:
4545
maxkb_logger.error(f'Exception: {e}', exc_info=True)

apps/models_provider/impl/aliyun_bai_lian_model_provider/credential/stt/omni_stt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def is_valid(self,
4747
return False
4848

4949
try:
50-
model = provider.get_model(model_type, model_name, model_credential)
50+
model = provider.get_model(model_type, model_name, model_credential, **model_params)
5151
model.check_auth()
5252
except Exception as e:
5353
maxkb_logger.error(f'Exception: {e}', exc_info=True)

apps/models_provider/impl/aliyun_bai_lian_model_provider/model/stt/asr_stt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,4 @@ def speech_to_text(self, audio_file):
7171

7272
except Exception as err:
7373
maxkb_logger.error(f":Error: {str(err)}: {traceback.format_exc()}")
74+
raise

apps/models_provider/impl/aliyun_bai_lian_model_provider/model/stt/omni_stt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,4 @@ def speech_to_text(self, audio_file):
8888

8989
except Exception as err:
9090
maxkb_logger.error(f":Error: {str(err)}: {traceback.format_exc()}")
91+
raise

apps/models_provider/impl/tencent_model_provider/model/stt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,4 @@ def speech_to_text(self, audio_file):
8181

8282
except TencentCloudSDKException as err:
8383
maxkb_logger.error(f":Error: {str(err)}: {traceback.format_exc()}")
84+
raise

apps/models_provider/impl/vllm_model_provider/model/whisper_sst.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,5 @@ def speech_to_text(self, audio_file):
6666
return result.text
6767

6868
except Exception as err:
69-
maxkb_logger.error(f":Error: {str(err)}: {traceback.format_exc()}")
69+
maxkb_logger.error(f":Error: {str(err)}: {traceback.format_exc()}")
70+
raise

apps/models_provider/impl/xf_model_provider/model/zh_en_stt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ async def handle():
116116
return asyncio.run(handle())
117117
except Exception as err:
118118
maxkb_logger.error(f"语音识别错误: {str(err)}: {traceback.format_exc()}")
119-
return ""
119+
raise
120120

121121
def merge_params_to_frame(self, frame,params):
122122

0 commit comments

Comments
 (0)