From 16d226e5ce47e689981641615ae0dbb328a0c8ba Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Tue, 16 Jun 2026 23:38:28 +0200 Subject: [PATCH] refactor(podcasts): plan transcript length from midpoint seconds --- surfsense_backend/app/podcasts/generation/transcript/nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/surfsense_backend/app/podcasts/generation/transcript/nodes.py b/surfsense_backend/app/podcasts/generation/transcript/nodes.py index 44d6b219d..7b472348d 100644 --- a/surfsense_backend/app/podcasts/generation/transcript/nodes.py +++ b/surfsense_backend/app/podcasts/generation/transcript/nodes.py @@ -38,7 +38,7 @@ async def plan_outline( tc = TranscriptConfig.from_runnable_config(config) llm = await _require_llm(state, tc) - target_words = round(tc.spec.duration.midpoint_minutes * _WORDS_PER_MINUTE) + target_words = round(tc.spec.duration.midpoint_seconds * _WORDS_PER_MINUTE / 60) suggested_segments = max(1, round(target_words / _WORDS_PER_SEGMENT)) messages = [