SubtitleAI is a modern web application that translates subtitle files using Google's Gemini AI. The application provides a sleek, user-friendly interface to upload subtitle files, translate them to various languages, and export the translated subtitles in multiple formats.
- Multiple Format Support: Translate SRT, VTT, and ASS subtitle files
- Powered by Gemini AI: High-quality translations with context awareness
- Real-time Progress Tracking: Monitor translation progress in real-time
- Smart Batch Processing: Optimizes API usage and improves translation quality
- Context-Aware Translation: Maintains consistency across related subtitles
- Advanced Translation Controls:
- Pause/Resume functionality
- Batch retry for failed translations
- Manual editing of translated subtitles
- AI Suggestions: Get alternative translation suggestions for subtitles
- Flexible Export Options:
- Export in original or different subtitle formats
- Bilingual export with both original and translated text
- Full Customization: Customize prompts to control translation style and tone
- Mobile Responsive: Works seamlessly on desktop and mobile devices
- Node.js 18.x or higher
- A Google Gemini API key (https://ai.google.dev/)
-
Clone the repository:
git clone https://github.com/bihv/subtitle-translate-web-v2.git cd subtitle-translate-v2
-
Install dependencies:
npm install
-
Create a
.env.local
file in the root directory and add the following:NEXT_PUBLIC_SITE_URL=http://localhost:3000
-
Start the development server:
npm run dev
-
Open your browser and navigate to http://localhost:3000
- Enter your Gemini API key
- Upload a subtitle file (SRT, VTT, or ASS) via drag-and-drop or file selector
- Choose your target language from the dropdown
- Customize the translation prompt if needed
- Click "Start Translation" to begin the process
- Use the controls to pause, resume, or stop translation as needed
- Edit any translations directly or use AI suggestions for improvements
- Retry any failed translations individually or in batches
- Export the translated subtitles in your preferred format
- Frontend: Next.js 15.3.0 with React 19
- UI Framework: Tailwind CSS with ShadCN UI components
- AI Integration: Google Gemini AI through @google/generative-ai
- Analytics: Optional Google Analytics integration
- SEO Optimization: Open Graph images, metadata, and JSON-LD
- Internationalization: Multi-language support with context-aware translations
The app uses a custom favicon for brand identity. To update the favicon:
- Create favicon images in various sizes (16x16, 32x32, 192x192, 512x512)
- Use tools like Favicon.io or RealFaviconGenerator
- Place the generated files in the following locations:
public/favicon.ico
- Main favicon filepublic/favicon/icon-16x16.png
- 16x16 PNG iconpublic/favicon/icon-32x32.png
- 32x32 PNG iconpublic/favicon/icon-192x192.png
- 192x192 PNG icon (for Android)public/favicon/icon-512x512.png
- 512x512 PNG icon (for PWA)public/favicon/apple-icon-180x180.png
- 180x180 PNG icon (for iOS)
- Metadata for the icons is already configured in the app
Client-side storage: Your API key can be stored in browser storage for convenience
API keys are never sent to our servers and all translations occur directly between your browser and Google's API servers.
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Generative AI for providing the translation capabilities
- Next.js team for the excellent framework
- ShadCN UI for the beautiful UI components
- All contributors to the project
Visit the live site: translate.io.vn