Skip to main content

Pixel-art open book with sound bars bouncing above it

Sawt

صوت (sawt): Arabic for "voice" or "sound".

Listen to any web page, or turn a whole book into an audiobook, with a natural voice that runs on your own computer.

Free, private, offline. No account, no subscription, no usage limits, and nothing you read is ever sent to a server: the voice model (Kokoro, 82M parameters) runs locally on your CPU.

  • Read any article aloud from the browser: one click or Alt+R. Menus, ads and sidebars are skipped, the sentence being spoken is highlighted, and every page resumes where you left off.
  • Convert books (EPUB, PDF, TXT) into .m4b audiobooks with chapter markers, mastered to audiobook loudness standards.
  • 28 English voices, American and British, with adjustable speed.

Status: v0.1, early. It works well for the author daily; expect rough edges. Bug reports and contributions are very welcome. See CONTRIBUTING.md.

How it works

 Browser extension                        Your computer
┌───────────────────────┐   article text   ┌──────────────────────────────┐
│ finds the article     │ ───────────────▶ │ sawt serve              │
│ plays + highlights    │ ◀─────────────── │ Kokoro voice model (CPU)     │
└───────────────────────┘   sentence audio  └──────────────────────────────┘
                     only over 127.0.0.1 - never the internet

The extension can't run a voice model by itself, so it talks to a small engine you run locally. The engine keeps the model loaded, synthesizes a few sentences ahead of playback, and caches the audio, so re-opening an article plays instantly.

Install

1. Install the engine. You need uv, the Python installer (skip this if uv --version already works):

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Then:

uv tool install sawt
sawt agent install   # downloads the voice model once (~350MB), then runs in the background

From then on the engine starts by itself when you log in and restarts if it stops, so there is no window to keep open. sawt agent status checks on it and sawt agent uninstall removes it. To run it only when you want, use sawt serve and keep that terminal open instead.

After uv tool upgrade sawt, run sawt agent install again to restart on the new version.

2. Add the browser extension from the Chrome Web Store. Its setup page checks that the engine is running.

3. Open any article and press Alt+R.

Usage

Reading web pages

Do this To
Toolbar icon → Read this page, or Alt+R Read the article
Alt+R again Pause / resume
Right-click selected text → Read selection aloud Hear just that, when the page's article detection picks the wrong block
Popup → voice / speed Change it mid-article; reading continues from the current sentence

More: docs/extension.md (highlighting, resume, limits).

Converting books

Needs FFmpeg on your PATH.

sawt extract ~/Downloads/mybook.epub     # -> chapters
sawt inspect                             # check what extraction produced
sawt synth                               # synthesize (hours for a novel; resumable)
sawt build                               # -> ~/Sawt/out/<book>.m4b

Or several at once, unattended: sawt batch books/*.epub --voice af_bella --speed 0.85. The full guide (voices, pronunciation fixes, trimming front matter, quality checks): docs/books.md.

Run sawt with no arguments for every command.

Configuration

Setting Default What it does
SAWT_HOME ~/Sawt Where books, output, the audio cache and pronounce.json live
SAWT_MODELS ~/.cache/sawt/models Where the voice model is stored
SAWT_EXTENSION_IDS the published extension Extra extension IDs the engine accepts (comma-separated), e.g. a fork with its own ID
sawt serve --port 7865 Port the engine listens on (the extension expects 7865)
pronounce.json — Whole-word pronunciation fixes, e.g. {"Gregor": "Gregg or"}

Platform support

Engine Start at login Extension
macOS ✅ ✅ sawt agent install (launchd) ✅ Chrome; other Chromium browsers should work
Linux ✅ ⚠️ sawt agent install (systemd user service), new and lightly tested ✅ Chrome / Chromium
Windows ⚠️ expected to work, untested ⚠️ sawt agent install (Task Scheduler), new and untested ✅ Chrome

English only for now. Firefox and Safari are not supported yet.

Privacy and security

  • The extension reads a page only when you ask, and sends its text only to 127.0.0.1.
  • The engine makes one network request ever: the first-run model download, verified against pinned SHA-256 hashes.
  • The engine refuses requests from web pages and from other extensions. Details in SECURITY.md; the full policy is in PRIVACY.md.

Troubleshooting

Problem Fix
Popup says the engine isn't running sawt agent status, then sawt agent install to (re)start it. The log is ~/Sawt/work/serve.log. Check it answers: curl -H "X-Sawt: 1" http://127.0.0.1:7865/health
sawt: command not found after install Open a new terminal, or run uv tool update-shell
Nothing is read on a page Scroll first if the page loads text lazily, or select the text and right-click → Read selection aloud
A name is mispronounced Add it to pronounce.json in SAWT_HOME with a phonetic spelling
build fails Install FFmpeg (brew install ffmpeg, apt install ffmpeg, or winget install ffmpeg)

Roadmap

  • A desktop app that bundles the engine, so no terminal is needed
  • Firefox support
  • More languages (Kokoro has voices for Spanish, French, Hindi, Italian, Japanese, Portuguese and Chinese)

Ideas and votes welcome in issues.

Contributing

Pull requests are welcome, from typo fixes to new features. Start with CONTRIBUTING.md (setup takes a couple of minutes) and docs/architecture.md for a map of the code. Issues marked good first issue are a gentle way in.

Credits

  • Kokoro by hexgrad, the voice model (Apache-2.0)
  • kokoro-onnx, which runs it on the CPU (MIT)
  • Readability by Mozilla, which finds the article on a page (Apache-2.0)
  • Pronunciation falls back to espeak-ng (GPL-3.0), installed as a dependency of kokoro-onnx

Convert books you own, public-domain texts and your own writing. Distributing a synthesized copy of an in-copyright book is not allowed.

Licence

MIT

Metadata

Release files for sawt 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sawt 0.1.2
File Size Uploaded Provenance Actions
sawt-0.1.2.tar.gz 153.7 kB Without provenance Details for sawt-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sawt 0.1.2
File Interpreter ABI Platform Actions
sawt-0.1.2-py3-none-any.whl Python 3 none any Details for sawt-0.1.2-py3-none-any.whl

Total release size: 201.7 kB

Release files / sawt-0.1.2.tar.gz

Download URL sawt-0.1.2.tar.gz
Size 153.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e1b510fc0e409856949a4e6b0e9655f2583e184049b152d8cd84c6d649b974ed
BLAKE2b-256 checksum
How to use checksums
e6c5ce113f7ff05359569c7e38c0c9ff229a9f799f3f24019b3ed28d80a2d520
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / sawt-0.1.2-py3-none-any.whl

Download URL sawt-0.1.2-py3-none-any.whl
Size 48.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8668481ccc5c81c2f349bbe09209c3802cb2213e0ea7d3c3eae3d8f737421d5
BLAKE2b-256 checksum
How to use checksums
e14792d8ecd6b76ee85e1da6c87bdbf8f7ddcdc8b30d6b82a88b26b7c9f5a603
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for sawt 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page