From 672912f2be70b31fbf6f7873351b0ac937165426 Mon Sep 17 00:00:00 2001 From: lihongyang Date: Thu, 15 Jan 2026 14:32:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A9=9F=E8=83=BD=E8=BF=BD=E5=8A=A0=EF=BC=9A?= =?UTF-8?q?=20=E6=95=B0=E5=AD=97=E4=BA=BA=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/scripter.py | 22 ++++++++++++++++++---- src/Avatar.tsx | 2 +- src/Composition.tsx | 13 ++++--------- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/backend/scripter.py b/backend/scripter.py index 4d3eb49..06b3dc7 100644 --- a/backend/scripter.py +++ b/backend/scripter.py @@ -161,6 +161,8 @@ class ScriptGenerator: client_name = pdf_data.get("client_name", "お客様") current_age = pdf_data.get("current_age", 35) retirement_age = pdf_data.get("retirement_age", 65) + current_year = 2025 # TODO: Make dynamic + retirement_year = current_year + (retirement_age - current_age) segments = [ { @@ -176,25 +178,37 @@ class ScriptGenerator: "type": "chart_intro", "chartSync": { "chartId": "cashFlow", + "highlightYear": current_year, }, }, { "id": 3, + "text": f"年間の収入と支出のバランスを確認します。現在は安定した黒字が続いています。", + "duration": 4.5, + "type": "chart_highlight", + "chartSync": { + "chartId": "cashFlow", + "highlightYear": current_year, + }, + }, + { + "id": 4, "text": f"{retirement_age}歳での退職を想定した場合、将来の資産推移はこのようになります。", "duration": 4.0, "type": "chart_highlight", "chartSync": { "chartId": "assetDepletion", + "highlightYear": retirement_year, }, }, { - "id": 4, - "text": "退職後の生活資金については、計画的な準備が大切です。", - "duration": 3.5, + "id": 5, + "text": "退職後の生活資金については、計画的な準備が大切です。定期的に見直しを行いましょう。", + "duration": 5.0, "type": "narration", }, { - "id": 5, + "id": 6, "text": "ご不明な点がございましたら、いつでもご相談ください。ありがとうございました。", "duration": 4.0, "type": "narration", diff --git a/src/Avatar.tsx b/src/Avatar.tsx index 4590e91..8866c5d 100644 --- a/src/Avatar.tsx +++ b/src/Avatar.tsx @@ -165,7 +165,7 @@ export const Avatar: React.FC = ({ fontFamily: "Noto Sans JP, sans-serif", }} > - AIアシスタント + 廖神様 {/* CSS animations */} diff --git a/src/Composition.tsx b/src/Composition.tsx index cb10d08..08e1b1d 100644 --- a/src/Composition.tsx +++ b/src/Composition.tsx @@ -71,21 +71,16 @@ export const MainVideo: React.FC = (props) => { return ( - {/* Render each script segment as a Sequence */} + {/* Global chart layer - plays continuously across all segments */} + + + {/* Render each script segment as a Sequence (for audio and subtitles only) */} {timeline.map((segment: any) => ( - {/* Scene content based on segment type */} - {segment.type === "chart_intro" || segment.type === "chart_highlight" ? ( - - ) : ( - // For narration segments, show chart with overlay - - )} - {/* Audio narration (if available) */} {segment.audioPath && (