import React from 'react'; import { Grid, Box, Button, Typography, Stack, CircularProgress, LinearProgress, Alert, Paper } from '@mui/material'; import { VideoStudioLayout } from '../../VideoStudioLayout'; import { useAddAudioToVideo } from './hooks/useAddAudioToVideo'; import { VideoUpload, AudioSettings } from './components'; import CheckCircleIcon from '@mui/icons-material/CheckCircle'; import ErrorIcon from '@mui/icons-material/Error'; import MusicNoteIcon from '@mui/icons-material/MusicNote'; const AddAudioToVideo: React.FC = () => { const { videoFile, videoPreview, model, prompt, seed, processing, progress, error, result, setVideoFile, setModel, setPrompt, setSeed, canAddAudio, costHint, addAudio, reset, } = useAddAudioToVideo(); return ( {/* Left Panel - Upload & Settings */} {processing && ( Generating audio... This may take a few minutes... )} {error && ( {}} icon={}> {error} )} {result && ( } action={ } > Audio added successfully! Cost: ${result.cost.toFixed(4)} )} {/* Right Panel - Preview & Results */} {result ? ( // Result view Video with Audio ) : videoPreview ? ( // Original video preview Original Video Preview ) : ( Upload a video to see preview Your video with audio will appear here )} {/* Info Box */} About Audio Generation Models Hunyuan Video Foley: Multi-scene synchronization – Audio aligned to complex, fast-cut visuals 48 kHz hi-fi output – Professional clarity with low noise Pricing: $0.02/second Think Sound: Context-aware sound – Analyzes visual elements to generate matching audio Prompt-guided output with built-in Prompt Enhancer for AI-assisted optimization High-quality output with clear, realistic audio Pricing: $0.05 per video (flat rate) Pro Tips for Best Quality: Use videos with clear visuals and distinct actions for best audio matching Add prompts to specify the type of sound (e.g., "engine roaring", "footsteps on gravel") Ensure videos have visible sound-producing elements like movement or impacts Fix the seed when iterating to compare different prompt variations ); }; export { AddAudioToVideo }; export default AddAudioToVideo;