A powerful AI-driven video story generation platform that creates cinematic videos with custom narration, professional aspect ratios, and advanced voice cloning capabilities.
- Multiple TTS Engines: Puter.js neural/generative TTS (free) + Fish Audio premium TTS
- Voice Cloning: Custom voice cloning with browser-based audio analysis
- Fish Audio Integration: Professional voice synthesis with emotion syntax and breathing effects
- Voice Selection: 20+ pre-configured voices with pitch, speed, and emotion controls
- Multi-Service Fallback: Pollinations.ai β Dezgo β Styled Canvas Placeholders
- Anti-Watermark: Optimized settings for clean, professional images
- Smart Fallbacks: Never fails - always generates visual content
- Debug Logging: Comprehensive tracking of which services succeed
- Multiple Aspect Ratios: 16:9, 9:16, 1:1, 21:9, 4:3, 32:9
- High-Quality Export: WebM with VP9 codec, up to 4K resolution
- Ken Burns Effects: Smooth zoom and pan animations
- Quality Options: 720p, 1080p, Ultra quality settings
- Error Recovery: Comprehensive error handling and fallback systems
- Storage Management: Auto-cleanup for localStorage quota management
- Permission Handling: User-friendly microphone and browser permission guidance
- Stack-Safe Processing: Fixed all memory overflow issues for large files
- Node.js (v16 or higher)
- Modern web browser with microphone access
-
Clone the repository:
git clone https://github.com/yourusername/ai-story-weaver.git cd ai-story-weaver -
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.localfile with:GEMINI_API_KEY=your_gemini_api_key_here FISH_AUDIO_API_KEY=your_fish_audio_key_here (optional) FISH_AUDIO_DEVELOPER_ID=your_developer_id_here (optional) -
Run the development server:
npm run dev
-
Open your browser: Navigate to
http://localhost:5173
- Enter Your Concept: Describe your story idea in the text input
- Select Aspect Ratio: Choose from 6 professional formats
- Configure Voice:
- Use built-in voices or clone your own
- Adjust pitch, speed, and emotion settings
- Test Fish Audio premium voices with breathing effects
- Generate: Click "Weave Story" and watch the magic happen!
- Export: Download your video in high quality WebM format
- Record Sample: Use the microphone to record 10-30 seconds
- Upload Audio: Or upload an existing audio file
- Clone Voice: Process your voice for custom narration
- Use in Stories: Your cloned voice becomes available for selection
- Frontend: React + TypeScript + Vite
- AI Services:
- Google Gemini API (story generation)
- Pollinations.ai (primary image generation)
- Dezgo API (fallback image generation)
- Audio:
- Puter.js TTS (free neural/generative)
- Fish Audio API (premium humanized)
- Web Audio API (voice analysis)
- Video: Canvas API + MediaRecorder (WebM/VP9)
βββ components/
β βββ AspectRatioSettings.tsx # Aspect ratio selection
β βββ VoiceSettings.tsx # Voice configuration
β βββ VoiceCloning.tsx # Custom voice cloning
β βββ VideoExport.tsx # Video export functionality
β βββ Header.tsx # App header
β βββ Loader.tsx # Loading animations
β βββ ScriptInput.tsx # Story input form
β βββ VideoPlayer.tsx # Video playback
βββ services/
β βββ geminiService.ts # AI story & image generation
β βββ ttsService.ts # Text-to-speech services
βββ types.ts # TypeScript definitions
βββ constants.ts # App configuration
- Sign up at Fish Audio
- Get your API key and developer ID
- Add to
.env.localfor premium voice features
- Pitch: -20 to +20 (adjusts voice tone)
- Speed: 0.5x to 2.0x (speech rate)
- Emotion: happy, sad, excited, calm, angry, surprised
- Landscape: 16:9 (1920Γ1080), 21:9 (2560Γ1080), 4:3 (1440Γ1080)
- Portrait: 9:16 (1080Γ1920)
- Square: 1:1 (1080Γ1080)
- Ultra-wide: 32:9 (3840Γ1080)
Microphone Permission Denied
- Click microphone icon in browser address bar
- Allow microphone access for the site
Image Generation Fails
- Check console for service status
- Fallback system ensures content always generates
Storage Quota Exceeded
- Auto-cleanup removes old voice profiles
- Clear browser data if needed
Large File Errors
- Fixed stack overflow issues
- All file processing is now stack-safe
npm run buildnpm i -g vercel
vercel --prodnpm run build
# Upload dist/ folder to Netlify- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini for AI story generation
- Fish Audio for premium voice synthesis
- Pollinations.ai for free image generation
- Puter.js for neural text-to-speech
For support, questions, or feature requests:
- Open an issue on GitHub
- Check the troubleshooting section above
- Review console logs for detailed error information
Made with β€οΈ using AI and modern web technologies