Study-with-TTS
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v5View latest version
A modern web application that converts text to speech with real-time highlighting and comprehensive playback controls.
-
Text Input Methods:
- Paste plain text into textarea
- Upload .txt or .pdf files
- Real-time text parsing and display
-
Text-to-Speech:
- Natural, human-like voice using Web Speech API
- Real-time sentence/paragraph highlighting
- Comprehensive playback controls (play, pause, stop, restart)
- Adjustable reading speed (0.5x to 2x)
- Voice selection from available system voices
-
User Experience:
- Clean, minimalist UI design
- Mobile responsive layout
- Real-time visual feedback
- Error handling and user notifications
- Frontend: React 18.2.0 with TypeScript
- Styling: TailwindCSS
- Backend: Hono.js API framework
- File Processing: PDF.js for PDF parsing
- Speech: Web Speech API (browser-native)
├── backend/
│ └── index.ts # Main API server
├── frontend/
│ ├── components/
│ │ ├── App.tsx # Main application component
│ │ ├── TextInput.tsx # Text input and file upload
│ │ ├── TextDisplay.tsx # Text display with highlighting
│ │ └── TTSControls.tsx # TTS playback controls
│ ├── index.html # Main HTML template
│ ├── index.tsx # Frontend entry point
│ └── style.css # Custom styles
├── shared/
│ └── types.ts # Shared TypeScript types
└── README.md
- Visit the application URL
- Either paste text or upload a .txt/.pdf file
- Use the playback controls to start text-to-speech
- Adjust speed and voice as needed
- Watch real-time highlighting as text is read
GET /- Serves the main applicationPOST /api/parse-pdf- Parses uploaded PDF files- Static file serving for frontend assets