Fix opening filler via lean tags and intro QC gate.
selftest / selftest (push) Canceled after 0s

Stop naming filler syllables in tags (they conditioned the model); default prefer_lean_tags; hard-fail intro_filler in QC; add plugins/ hook bus as thin microkernel extension point.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
swl
2026-10-10 12:49:25 +08:00
co-authored by Cursor
parent 0ab8d8ad4d
commit b1afe68f3c
20 changed files with 426 additions and 84 deletions
+2
View File
@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
"""内置插件包。"""
+17
View File
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
"""开曲衬词守卫:在 tags 组装后做一次音节点名扫描(双保险)。"""
from ..hooks import bus
from ...core.errors import RuleViolation
_BAD = ("mm mm", "ooh ooh", "oh oh syllables", "wu wu wu",
"en en", "ng ng", "woo woo")
@bus.on("after_assemble")
def _guard_syllable_names(tags, lyrics, **_kw):
low = (tags or "").lower()
hits = [b for b in _BAD if b in low]
if hits:
raise RuleViolation(
"tags 点名衬词音节 %s(会诱发开曲衬词)" % ", ".join(hits))
return None