parent
423743082c
commit
672912f2be
|
|
@ -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,
|
||||
"type": "narration",
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"text": "退職後の生活資金については、計画的な準備が大切です。定期的に見直しを行いましょう。",
|
||||
"duration": 5.0,
|
||||
"type": "narration",
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"text": "ご不明な点がございましたら、いつでもご相談ください。ありがとうございました。",
|
||||
"duration": 4.0,
|
||||
"type": "narration",
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ export const Avatar: React.FC<AvatarProps> = ({
|
|||
fontFamily: "Noto Sans JP, sans-serif",
|
||||
}}
|
||||
>
|
||||
AIアシスタント
|
||||
廖神様
|
||||
</div>
|
||||
|
||||
{/* CSS animations */}
|
||||
|
|
|
|||
|
|
@ -71,21 +71,16 @@ export const MainVideo: React.FC<any> = (props) => {
|
|||
|
||||
return (
|
||||
<AbsoluteFill style={{ backgroundColor: "white" }}>
|
||||
{/* Render each script segment as a Sequence */}
|
||||
{/* Global chart layer - plays continuously across all segments */}
|
||||
<DualChartView cashflowData={cashflowData} />
|
||||
|
||||
{/* Render each script segment as a Sequence (for audio and subtitles only) */}
|
||||
{timeline.map((segment: any) => (
|
||||
<Sequence
|
||||
key={segment.id}
|
||||
from={segment.startFrame}
|
||||
durationInFrames={segment.durationInFrames}
|
||||
>
|
||||
{/* Scene content based on segment type */}
|
||||
{segment.type === "chart_intro" || segment.type === "chart_highlight" ? (
|
||||
<DualChartView cashflowData={cashflowData} />
|
||||
) : (
|
||||
// For narration segments, show chart with overlay
|
||||
<DualChartView cashflowData={cashflowData} />
|
||||
)}
|
||||
|
||||
{/* Audio narration (if available) */}
|
||||
{segment.audioPath && (
|
||||
<Audio src={staticFile(segment.audioPath.replace(/\\/g, "/"))} />
|
||||
|
|
|
|||
Loading…
Reference in New Issue