Vorlesen
Text-to-speech tool for authors to proofread their work by listening back. Powered by Google Cloud Text-to-Speech.
Features
- 🎯 Paste unlimited text (automatically chunked into 4000 char segments)
- 🎙️ 3 high-quality voices (WaveNet & Neural2)
- 🎵 Adjustable playback speed (0.5x - 2x)
- 💾 Browser localStorage persistence
- ⚡ Progress tracking with retry logic
- 📥 Download as MP3
Setup
1. Install Dependencies
npm install
2. Configure Google Cloud TTS
You need Google Cloud Text-to-Speech API credentials. Choose ONE option:
Option A: API Key (Simplest)
- Go to Google Cloud Console
- Enable Text-to-Speech API
- Go to APIs & Services → Credentials
- Click Create Credentials → API Key
- Restrict to Text-to-Speech API only
- Create
.env.local:
GOOGLE_CLOUD_TTS_API_KEY=your_api_key_here
Option B: Service Account (Local Development)
- Download service account JSON from Google Cloud Console
- Create
.env.local:
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
Option C: Service Account (Vercel Deployment)
- Copy entire contents of
service-account.json
- In Vercel: Project Settings → Environment Variables
- Add variable:
Name: GOOGLE_CLOUD_SERVICE_ACCOUNT
Value: {"type":"service_account","project_id":"...",...}
3. Run Development Server
npm run dev
Open http://localhost:3000
Deploy to Vercel
- Click "Deploy" button above
- Add environment variable:
GOOGLE_CLOUD_SERVICE_ACCOUNT with your service account JSON
- Deploy!
Tech Stack
- Framework: Next.js 15 (App Router)
- UI: ShadCN UI + Tailwind CSS
- TTS: Google Cloud Text-to-Speech API
- Audio: Web Audio API + lamejs for MP3 encoding
- Storage: Browser localStorage (5MB with LRU eviction)
Architecture
- Text Chunking: Splits text at sentence boundaries (4000 char max)
- Parallel Processing: Converts chunks concurrently with progress tracking
- Audio Stitching: Decodes MP3 → concatenates PCM → re-encodes MP3
- Error Handling: Exponential backoff for rate limits, retry failed chunks
- Cost: $0.004 per 1K characters (75x cheaper than ElevenLabs)
Development
# Run tests
npm run test
# Run E2E tests
npm run test:e2e
# Build for production
npm run build
License
MIT