Skip to content

Commit 748f25f

Browse files
committed
Merge branch 'feature-branch'
2 parents 1f42b89 + 4a3deb7 commit 748f25f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

nonebot_plugin_fishspeech_tts/fish_audio_api.py

+6-8
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,10 @@ def get_speaker_list(self) -> list[str]:
196196
"""
197197
获取语音角色列表
198198
"""
199-
try:
200-
if is_reference_id_first:
201-
return_list = ["请查看官网了解更多: https://fish.audio/zh-CN/"]
199+
return_list = ["请查看官网了解更多: https://fish.audio/zh-CN/"]
200+
if is_reference_id_first:
201+
try:
202202
return_list.extend(get_path_speaker_list(self.path_audio))
203-
return return_list
204-
else:
205-
return get_path_speaker_list(self.path_audio)
206-
except FileHandleException as e:
207-
raise APIException(str(e))
203+
except FileHandleException:
204+
logger.warning("音频文件夹不存在或无法读取")
205+
return return_list

0 commit comments

Comments
 (0)