A React application that takes Arabic text, splits it by punctuation, translates each phrase to a selected language (French or Finnish), and generates a bilingual audio MP3 file where each phrase is spoken first in the translated language, then in Arabic.
- 📝 Split Arabic text by punctuation marks (commas, dots, question marks, etc.)
- 🌐 Translate Arabic text to French or Finnish
- 🔊 Generate bilingual audio (translated language + Arabic)
- 💾 Export as MP3 file
- 🆓 Completely free - uses free TTS and translation APIs
- React + Vite
- Browser Speech Synthesis APIs
- Free TTS services (Google TTS via CORS proxy)
- Free Translation APIs (Google Translate, MyMemory, LibreTranslate)
- lamejs for MP3 encoding
- Node.js 18+
- pnpm (recommended) or npm
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Build for production
pnpm build
# Preview production build
pnpm previewThis project is configured for easy deployment to Vercel:
- Push your code to GitHub
- Import your repository in Vercel
- Vercel will automatically detect it's a Vite project
- Deploy!
The vercel.json file is already configured with:
- Build command:
pnpm build - Output directory:
dist - Framework:
vite
- Select the destination language (French or Finnish)
- Enter Arabic text in the textarea
- Click "Generate Audio"
- Wait for translation and audio generation
- Download the MP3 file
- Text Splitting: The input text is split by punctuation marks (.,!?;:؟،)
- Translation: Each phrase is translated from Arabic to the selected language
- Audio Generation:
- First, the translated text is converted to speech
- Then, the original Arabic text is converted to speech
- Both are merged with pauses between them
- MP3 Export: The combined audio is encoded as MP3 and made available for download
- The app uses free APIs which may have rate limits
- CORS proxies are used to access Google TTS and Translate APIs
- Audio quality depends on the TTS service availability
- Translation quality may vary - Google Translate is prioritized for better results