liumaolin
commited on
Commit
·
3b73d5e
1
Parent(s):
9bfcd24
Adjust sorting priority in `audio_generator/models/base.py`: prioritize `language_bonus` over `priority` for config selection.
Browse files
src/VoiceDialogue/services/audio/audio_generator/models/base.py
CHANGED
|
@@ -175,7 +175,7 @@ class TTSConfigRegistry:
|
|
| 175 |
language_bonus = 0 if language_match else 1
|
| 176 |
|
| 177 |
# 角色名称作为最后的排序条件
|
| 178 |
-
return (
|
| 179 |
|
| 180 |
sorted_configs = sorted(configs, key=sort_key)
|
| 181 |
return sorted_configs[0]
|
|
|
|
| 175 |
language_bonus = 0 if language_match else 1
|
| 176 |
|
| 177 |
# 角色名称作为最后的排序条件
|
| 178 |
+
return (language_bonus, priority, config.character_name)
|
| 179 |
|
| 180 |
sorted_configs = sorted(configs, key=sort_key)
|
| 181 |
return sorted_configs[0]
|