Skip to content

A lightweight Python library providing a common interface to multiple TTS and screen reader APIs

License

Notifications You must be signed in to change notification settings

nstockton/speechlight

Repository files navigation

Speechlight

Current Version on PyPi License Supported Python Versions PyPi Downloads in Last 7 Days PyPi Downloads in Last 30 Days PyPi Total Downloads

A lightweight Python library providing a common interface to multiple TTS and screen reader APIs. See the API reference for more information.

License And Credits

Speechlight is licensed under the terms of the Mozilla Public License, version 2.0. Speechlight was originally created by Nick Stockton. macOS support by Jacob Schmude.

Installation

pip install --user speechlight

Running From Source

Windows-specific Instructions

Execute the following commands from the root directory of this repository to install the virtual environment and project dependencies.

py -3 -m venv .venv
.venv\Scripts\activate.bat
pip install --upgrade --require-hashes --requirement requirements-poetry.txt
poetry install --no-ansi
pre-commit install -t pre-commit
pre-commit install -t pre-push

Linux-specific Instructions

Execute the following commands from the root directory of this repository to install the virtual environment and project dependencies.

python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade --require-hashes --requirement requirements-poetry.txt
poetry install --no-ansi
pre-commit install -t pre-commit
pre-commit install -t pre-push

Example Usage

from speechlight import speech

# Say something.
speech.say("Hello world!")

# Say something else, interrupting the currently speaking text.
speech.say("I'm a rood computer!", interrupt=True)

# Cancel the currently speaking message.
speech.silence()

# Braille something.
speech.braille("Braille dots go bump in the night.")

# Speak and braille text at the same time.
speech.output("Read along with me.")

# And to interrupt speech.
speech.output("Rood!", interrupt=True)

About

A lightweight Python library providing a common interface to multiple TTS and screen reader APIs

Resources

License

Stars

Watchers

Forks

Packages

No packages published