Local TTS reader demo with synchronized text highlighting.
- GitHub Pages: https://scottzzj.github.io/tts-reader/
- Local static preview:
http://127.0.0.1:8081/preview.html
The preview page is a static shell for README/demo display only. Real playback still depends on the backend and a TTS service.
See GitHub Pages preview: https://scottzzj.github.io/tts-reader/
frontend/: Vue 3 + Vite UIbackend/: Spring Boot API and static asset hostdocs/: GitHub Pages static preview
TTS modes:
mock: local fake audio for UI testinghttp: forwards requests to an external HTTP TTS bridge
Main capabilities:
- Editable reading input
- Read-along preview with synchronized highlighting
- Progressive chunk synthesis for long text
- Click-to-seek from highlighted text
- Timeline scrubbing
- Voice and speed switching
POST /api/ttsPOST /api/tts/tasksGET /api/tts/tasks/{taskId}GET /api/tts/voicesGET /api/tts/files/{fileName}
Frontend:
cd E:\IdeaWorkSpace\tts-reader\frontend
npm.cmd install
npm.cmd run devBackend:
cd E:\IdeaWorkSpace\tts-reader
.\mvnw.cmd -f backend\pom.xml spring-boot:runOpen:
- Main page:
http://127.0.0.1:8080 - Static preview:
http://127.0.0.1:8080/preview.html
This repo does not bundle CosyVoice itself. If you already have a compatible HTTP TTS service, point tts.http.base-url to it.
Common local setup:
- TTS bridge:
http://127.0.0.1:9880 - Main page:
http://127.0.0.1:8081 - Static preview:
http://127.0.0.1:8081/preview.html
Common scripts:
start-reader-real.bat: backend on8081withtts.mode=httpstart-real-stack.bat: bridge + backend + frontend dev server
Default backend config lives in backend/src/main/resources/application.yml.
tts:
mode: mock
output-dir: ${user.home}/tts-reader/outputs
public-path-prefix: /api/tts/files
chunk-concurrency: 2
stream-task-queue-capacity: 16
synthesis-queue-capacity: 128
http:
base-url: http://127.0.0.1:9880
connect-timeout-seconds: 5
read-timeout-seconds: 900This project is a local demo. The real playback path depends on an external HTTP TTS service.