AI Text to Speech & PDF reader Webui Via Docker
Listen to documents in your web browser with natural voices.
Pdf reader webui demo:
A "bring your own TTS api" web interface for reading PDF and EPUB documents with high quality text-to-speech voices. Read books with ease, l
Voices demo:
Kokoro is a frontier TTS model for its size of 82 million parameters (text in/audio out). On 25 Dec 2024, Kokoro v0.19 weights were permiss
First install docker:
Docker Desktop is collaborative containerization software for developers. Get started and download Docker Desktop today on Mac, Windows, or
(Note no account or login is necessary, just skip anything asking for it. And you can find countless tutorials to install docker on linux if you search )
Once docker is installed
Open powershell on windows or terminal on linux
Dockerized FastAPI wrapper for Kokoro-82M text-to-speech model w/CPU ONNX and NVIDIA GPU PyTorch support, handling, and auto-stitching - rem
Install kokoro:
docker run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:v0.2.2 # CPU
docker run --gpus all -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:v0.2.2 #NVIDIA GPU
The cpu version works great and is probably what you want but if you have a nvidia gpu and it will be the only thing running (2-3gb vram necessary) you can also use the nvidia version, there are a few more versions of the voices which are slightly better quality and it is faster. (Nvidia cuda can process text up to 50x faster than real time and cpu is 1-4x usually which is perfectly fine for reading documents.)
Once you have kokoro setup you can use localhost/127.0.0.1 or your device ip at port 8880/web to access the kokoro webui
http://localhost:8880/web
And now that we have kokoro setup we can move on to openreader-webui.
Web based EPUB and PDF text to speech reader. Read along with your documents with your own local Kokoro-82M or OpenAI endpoint. - richardr11
Just like with kokoro were going to run another command in powershell(win)/terminal(linux)
docker run --name openreader-webui -e API_BASE=http://host.docker.internal:8880/v1 -p 3003:3003 -v openreader_docstore:/app/docstore richardr1126/openreader-webui:latest
(Replace host.docker.internal with the kokoro machines ip if desired or not running in the same docker environment)
Then you can follow the local host link to openreader-webui
http://localhost:3003
If for whatever reason you have trouble, set the openai base url to the machine Ip with http://<machine ip>:8880/1 it will probably be something like 192.168.1.36 or 10.0.0.25 or something.
And there you go, you are all up and running with more natural sounding AI text to speech and a web ui pdf reader that supports both PDF and Epub documents. No more robotic voices.
(NOTE: Windows 10/11 (WSL) or linux is required to run docker due to the components required to support the containers)










