feat: Add smart paragraph merging mode with AI grouping
Some checks failed
Deploy Documentation / deploy (push) Has been cancelled
Some checks failed
Deploy Documentation / deploy (push) Has been cancelled
- Add "smart" split mode that uses LLM to intelligently merge related paragraphs - Implement two-step approach: analyze text structure, then group by semantic relevance - Add paragraph_merging.py with analysis and grouping prompts - Update UI to support smart mode selection with auto-detect hint - Add i18n translations for smart mode (en_US, zh_CN) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -124,7 +124,13 @@ class StandardPipeline(LinearVideoPipeline):
|
||||
else: # fixed
|
||||
self._report_progress(ctx.progress_callback, "splitting_script", 0.05)
|
||||
split_mode = ctx.params.get("split_mode", "paragraph")
|
||||
ctx.narrations = await split_narration_script(text, split_mode=split_mode)
|
||||
target_segments = ctx.params.get("target_segments", 8)
|
||||
ctx.narrations = await split_narration_script(
|
||||
text,
|
||||
split_mode=split_mode,
|
||||
llm_service=self.llm if split_mode == "smart" else None,
|
||||
target_segments=target_segments
|
||||
)
|
||||
logger.info(f"✅ Split script into {len(ctx.narrations)} segments (mode={split_mode})")
|
||||
logger.info(f" Note: n_scenes={n_scenes} is ignored in fixed mode")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user