parent
423743082c
commit
672912f2be
|
|
@ -161,6 +161,8 @@ class ScriptGenerator:
|
||||||
client_name = pdf_data.get("client_name", "お客様")
|
client_name = pdf_data.get("client_name", "お客様")
|
||||||
current_age = pdf_data.get("current_age", 35)
|
current_age = pdf_data.get("current_age", 35)
|
||||||
retirement_age = pdf_data.get("retirement_age", 65)
|
retirement_age = pdf_data.get("retirement_age", 65)
|
||||||
|
current_year = 2025 # TODO: Make dynamic
|
||||||
|
retirement_year = current_year + (retirement_age - current_age)
|
||||||
|
|
||||||
segments = [
|
segments = [
|
||||||
{
|
{
|
||||||
|
|
@ -176,25 +178,37 @@ class ScriptGenerator:
|
||||||
"type": "chart_intro",
|
"type": "chart_intro",
|
||||||
"chartSync": {
|
"chartSync": {
|
||||||
"chartId": "cashFlow",
|
"chartId": "cashFlow",
|
||||||
|
"highlightYear": current_year,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
|
"text": f"年間の収入と支出のバランスを確認します。現在は安定した黒字が続いています。",
|
||||||
|
"duration": 4.5,
|
||||||
|
"type": "chart_highlight",
|
||||||
|
"chartSync": {
|
||||||
|
"chartId": "cashFlow",
|
||||||
|
"highlightYear": current_year,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
"text": f"{retirement_age}歳での退職を想定した場合、将来の資産推移はこのようになります。",
|
"text": f"{retirement_age}歳での退職を想定した場合、将来の資産推移はこのようになります。",
|
||||||
"duration": 4.0,
|
"duration": 4.0,
|
||||||
"type": "chart_highlight",
|
"type": "chart_highlight",
|
||||||
"chartSync": {
|
"chartSync": {
|
||||||
"chartId": "assetDepletion",
|
"chartId": "assetDepletion",
|
||||||
|
"highlightYear": retirement_year,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 4,
|
"id": 5,
|
||||||
"text": "退職後の生活資金については、計画的な準備が大切です。",
|
"text": "退職後の生活資金については、計画的な準備が大切です。定期的に見直しを行いましょう。",
|
||||||
"duration": 3.5,
|
"duration": 5.0,
|
||||||
"type": "narration",
|
"type": "narration",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 5,
|
"id": 6,
|
||||||
"text": "ご不明な点がございましたら、いつでもご相談ください。ありがとうございました。",
|
"text": "ご不明な点がございましたら、いつでもご相談ください。ありがとうございました。",
|
||||||
"duration": 4.0,
|
"duration": 4.0,
|
||||||
"type": "narration",
|
"type": "narration",
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ export const Avatar: React.FC<AvatarProps> = ({
|
||||||
fontFamily: "Noto Sans JP, sans-serif",
|
fontFamily: "Noto Sans JP, sans-serif",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
AIアシスタント
|
廖神様
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* CSS animations */}
|
{/* CSS animations */}
|
||||||
|
|
|
||||||
|
|
@ -71,21 +71,16 @@ export const MainVideo: React.FC<any> = (props) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AbsoluteFill style={{ backgroundColor: "white" }}>
|
<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) => (
|
{timeline.map((segment: any) => (
|
||||||
<Sequence
|
<Sequence
|
||||||
key={segment.id}
|
key={segment.id}
|
||||||
from={segment.startFrame}
|
from={segment.startFrame}
|
||||||
durationInFrames={segment.durationInFrames}
|
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) */}
|
{/* Audio narration (if available) */}
|
||||||
{segment.audioPath && (
|
{segment.audioPath && (
|
||||||
<Audio src={staticFile(segment.audioPath.replace(/\\/g, "/"))} />
|
<Audio src={staticFile(segment.audioPath.replace(/\\/g, "/"))} />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue