Simple node app for communicating with the local kokoro instance
150
A minimal, self-hosted text-to-speech player that connects to a local Kokoro server. Type or paste text, pick a voice, and play it back instantly — all in your browser.
node server.js
Opens at http://localhost:7755 automatically.
docker compose -f docker-compose-kokoro-tts-player.yml up -d --build
Then open http://YOUR-SERVER-IP:7755 in your browser.
.
├── server.js # Node.js server + embedded UI
├── Dockerfile # Docker image definition
└── docker-compose-kokoro-tts-player.yml # Docker Compose config
Click ⚙ server in the top right to set your Kokoro server URL.
http://192.168.x.x:8880
This is saved server-side to ~/.kokoro-tts-config.json and persists across restarts.
Note: If running inside Docker, use your host machine's LAN IP — not
localhost.
Select your preferred voice and speed directly from the main UI. These are saved to browser localStorage and restored automatically on your next visit.
| ID | Accent | Gender | Style |
|---|---|---|---|
af_heart | American | Female | Warm, natural — default |
af_bella | American | Female | Expressive |
af_sarah | American | Female | Conversational |
af_nova | American | Female | Clear |
af_sky | American | Female | Neutral |
af_nicole | American | Female | Friendly |
af_river | American | Female | Calm |
af_alloy | American | Female | Balanced |
af_jessica | American | Female | Energetic |
am_adam | American | Male | Deep |
am_michael | American | Male | Clear |
am_liam | American | Male | Conversational |
am_eric | American | Male | Authoritative |
am_fenrir | American | Male | Distinctive |
am_onyx | American | Male | Rich |
am_puck | American | Male | Expressive |
bf_emma | British | Female | Professional |
bf_isabella | British | Female | Warm |
bf_alice | British | Female | Crisp |
bf_lily | British | Female | Soft |
bm_george | British | Male | Authoritative |
bm_lewis | British | Male | Smooth |
bm_daniel | British | Male | Calm |
bm_fable | British | Male | Expressive |
The server exposes three endpoints used by the UI.
GET /configReturns the current server configuration.
POST /configSaves server configuration.
{ "kokoroUrl": "http://192.168.x.x:8880" }
POST /synthesizeSends text to Kokoro and streams back the MP3 audio.
{ "text": "Hello world", "voice": "af_heart", "speed": 1.0 }
If you're running Kokoro in Docker too, here's the minimal Kokoro setup to pair with this:
services:
kokoro:
image: hwdsl2/kokoro-server:cuda
container_name: kokoro
restart: always
ports:
- "8880:8880"
volumes:
- kokoro-data:/var/lib/kokoro
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
volumes:
kokoro-data:
Set the server URL in kokoro.tts to http://YOUR-HOST-IP:8880.
MIT
Content type
Image
Digest
sha256:26ab6affe…
Size
46.1 MB
Last updated
5 months ago
docker pull gibigbig/kokoro-api