Convert articles to audio you can stream, using local TTS models
Project description
Vocast
Convert articles to audio using local TTS models.
Why
I wanted a way to convert articles into audio that I could stream to my mobile device while on the go. This seemed straightforward enough to build myself and I didn't want to pay for an app.
How
Vocast uses Kokoro for TTS. It can fetch articles from a given URL or local text file. Audio files are saved to ~/.vocast/library. It provides an HTTP server
that exposes an RSS feed allowing for podcast apps to discover the converted audio files. You can use Tailscale to allow connections between the server and client devices
like your mobile phone. You will need to use a podcast app that does not proxy requests through their own servers as that will prevent the app from connecting to your Vocast server.
Requirements
- Python 3.10–3.12 (Kokoro does not yet support 3.13). If your default Python is newer, point pipx at a compatible one:
pipx install --python python3.12 vocast. espeak-ngon PATH (used by Kokoro as a fallback phonemizer)
ffmpeg is bundled (via imageio-ffmpeg), so the only system dependency is espeak-ng:
sudo dnf install espeak-ng # Fedora
sudo apt install espeak-ng # Debian/Ubuntu
brew install espeak-ng # macOS
Install
The easiest way is pipx, which installs vocast into an isolated environment and puts the command on your PATH so you can run it from anywhere:
pipx install vocast
If you don't have pipx, install into a virtual environment with pip:
python3.12 -m venv .venv && source .venv/bin/activate
pip install vocast
With this option vocast is only available while that venv is active.
The first run downloads the Kokoro weights (~300 MB) and a small spaCy model into the cache. Subsequent runs are immediate.
From source (development)
uv venv && source .venv/bin/activate
uv pip install -e .
Usage
Vocast has subcommands; run vocast --help to see them all.
Add an article to the library
vocast add https://example.com/article # fetch and synthesize a URL
vocast add notes.txt # synthesize a local text file
vocast add ... --title "Custom title" # override the title
vocast add ... --voice af_bella # use a different Kokoro voice
vocast add ... --quiet # suppress per-chunk progress
URLs are fetched and cleaned with trafilatura. Code blocks (<pre> elements) are stripped before synthesis since they don't translate well to audio. Each entry is stored under ~/.vocast/library/<id>/ as audio.mp3 plus meta.json with title, source URL, duration, and voice.
List the library
vocast list
Serve the library as a podcast feed
vocast serve # 127.0.0.1:8080 by default
vocast serve --host 0.0.0.0 --port 8000 # custom host/port
Exposes GET /feed.xml (podcast RSS) and GET /audio/<id>.mp3 (audio enclosures). Long articles are split on sentence boundaries during synthesis and concatenated with short silence between chunks.
Expose the feed to your phone over Tailscale
vocast init
A guided checklist that walks you through installing Tailscale, signing into your tailnet, and proxying vocast serve over HTTPS via tailscale serve. Re-run after each step until it prints your feed URL, then add that URL to a direct-download podcast app (Downcast is confirmed working).
Synthesize directly to a file (skip the library)
vocast synth article.txt # writes article.mp3
vocast synth article.txt -o out.wav # WAV output
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vocast-0.1.1.tar.gz.
File metadata
- Download URL: vocast-0.1.1.tar.gz
- Upload date:
- Size: 123.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb8bae2db43385a0ad17aa21cfefabb00e4e8ea3e5419ae8fcb85f871738fc6f
|
|
| MD5 |
66e1d90d1035731a9e5ae4705c3c131b
|
|
| BLAKE2b-256 |
5fd3a674b47361b4f16de6f1cde7c4aca7f2e874b3e0ae3bbb811f25006d65aa
|
File details
Details for the file vocast-0.1.1-py3-none-any.whl.
File metadata
- Download URL: vocast-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdfe827bf1687e6d8ee9ec2fec55e0ffab5d6589b20e25242df3519ac3eaf5ec
|
|
| MD5 |
d91720854ad96312ca7137d15c35628b
|
|
| BLAKE2b-256 |
adbc81bac2e1268bfdfa67537f7596eb7264fea250a8d20d495a6c80d55563c0
|