diff --git a/.kiro/specs/text-to-audiobook/tasks.md b/.kiro/specs/text-to-audiobook/tasks.md index b1be0df..e12135e 100644 --- a/.kiro/specs/text-to-audiobook/tasks.md +++ b/.kiro/specs/text-to-audiobook/tasks.md @@ -402,7 +402,7 @@ - Mock API responses - _Requirements: 15.1_ -- [ ] 21. Implement ScriptReviewSection component +- [x] 21. Implement ScriptReviewSection component - Create ScriptReviewSection component - Display list of script segments with text boxes - Add speaker dropdown for each segment diff --git a/frontend/src/components/ScriptReviewSection.tsx b/frontend/src/components/ScriptReviewSection.tsx new file mode 100644 index 0000000..d1ef9b3 --- /dev/null +++ b/frontend/src/components/ScriptReviewSection.tsx @@ -0,0 +1,111 @@ +import type { Role, ScriptSegment } from '../api/tts'; + +interface ScriptReviewSectionProps { + segments: ScriptSegment[]; + roles: Role[]; + onSegmentChange: (segmentId: string, newSpeaker: string) => void; + onGenerate: () => void; + onSkipReview: () => void; + isGenerating: boolean; +} + +export default function ScriptReviewSection({ + segments, + roles, + onSegmentChange, + onGenerate, + onSkipReview, + isGenerating, +}: ScriptReviewSectionProps) { + const handleSpeakerChange = (segmentId: string, newSpeaker: string) => { + onSegmentChange(segmentId, newSpeaker); + }; + + return ( +
+ Review the AI-generated script and adjust speaker assignments as needed. +
+ + {/* Script Segments */} +💡 Tip:
++ Review the AI-generated speaker assignments and make any necessary corrections before generating the audiobook. +
+