Skip to content

fix(cta): prevent multiple CTA segments — only last segment gets cta - #6

Merged
leether merged 1 commit into
mainfrom
feat/fix-cta-overuse
Jun 7, 2026
Merged

fix(cta): prevent multiple CTA segments — only last segment gets cta#6
leether merged 1 commit into
mainfrom
feat/fix-cta-overuse

Conversation

@leether

@leether leether commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Fix CTA overuse: add guard in segment_tts and storyboard_ai to ensure only the last segment is inferred as 'cta'. Also tighten segment_types.json keywords and provide repair script.

Problem:
  segments.json had 5 segments marked as 'cta' (s07, s09, s35, s42, s44).
  CTA should only appear at the video end.

Fixes:
- core/segment_tts.py: add guard in SemanticTypeAnalyzer.analyze()
  → non-last segments inferred as 'cta' are downgraded to 'narrative'
- extensions/storyboard/storyboard_ai.py: same guard in _infer_segment_type()
- rules/segment_types.json:
  • raise 'last' position confidence from 0.6 → 0.9
  • replace generic CTA keywords ('follow', 'like') with explicit phrases
    ('关注我们', '点赞支持', '扫码加入'...) to reduce false triggers
- scripts/fix_cta_overuse.py: one-shot repair script for existing segments.json

Also repaired output/rsi_cn/segments.json locally (5 cta -> narrative).
@leether
leether merged commit 2b6a2b6 into main Jun 7, 2026
1 check passed
@leether
leether deleted the feat/fix-cta-overuse branch June 7, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant