Skip to main content

Announce the time every hour similar to Mac OS X. Say the Time using Google TTS or espeak.

Project description

TimeSpeaker

Announce the time every hour similar to Mac OS X. Say the Time using Google TTS or espeak.

Requirements

  • python3.6+
  • playsound
  • gtts or pyttsx3

For development

  • poetry
  • flake8
  • black
  • pytest

TODO

  • Use python: threading.Timer
  • Create tests
  • Add system tray (opcional) by cli
  • Update/Fix to PyPi (pip install timespeaker)
  • Move Makefile to Parent
  • Configure PULL_REQUESTS AND ISSUES template
  • Configure lint
  • Configure github actions (or circleci)
  • Test i3 configs
  • Add support to Cron
  • Use a global DEBUG
  • When merge to main build and publish to PyPi (github actions)

Install

Default (Working In Progress)

pip install timespeaker

Local

On Local User

# pyenv shell +3.6.0
# asdf shell python +3.6.0

# optional (poetry create a virtualenv for you)
python -m venv .venv 

# install dependencies
make install

# clean old builds
make clean

# build package
make build

# install on local user package (python)
pip install --user dist/{path_from_last_command}.whl

Test local install

timespeaker check --speaker gtts

Configure

AutoStart (Working In Progress)

make configure-autostart

i3 (Working In Progress)

make configure-i3

Cron (Working In Progress)

Coming Soon

sudo make configure-cron

Systemd (Working In Progress)

sudo make configure-systemd

Remove configurations

# Systemd
sudo make remove-systemd

# Autostart
make remove-autostart

# i3
# coming soon

# Cron
# coming soon

Usage

Default usage using gtts to speak and saving in /tmp/timespeaker/

# after make install (or poetry install)
poetry run timespeaker start

# OR if configured (local user or via pip install timespeaker)
timespeaker start

Custom command:

poetry run timespeaker start --speaker=pyttsx3 --player=vlc --path-folder=/tmp/timespeaker/

How to check sounds

This speakes sound each 2 second from midnight to 23 hours.

poetry run timespeaker check-hours-sound gtts

Development

Using virtualenv (python venv):

# create virtualenv
# virtualenv .venv [-p /path/to/python3.6+] # require virtualenv
python -m venv .venv

# Enter virtualenv
source .venv/bin/activate

# to exit of virtual env run 
deactivate

Dev install (poetry required)

poetry install

See more commands with

make help

Tests

make test

License

MIT LICENSE

Contributing

I encourage you to contribute to this project! Join us!

Trying to report a possible security vulnerability? Open a issue now

Everyone interacting in this project and its sub-projects' codebases, issue trackers, chat rooms, and mailing lists is expected to follow the code of conduct (building, but respect everyone).

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

timespeaker-0.1.6.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

timespeaker-0.1.6-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file timespeaker-0.1.6.tar.gz.

File metadata

  • Download URL: timespeaker-0.1.6.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.4.0-88-generic

File hashes

Hashes for timespeaker-0.1.6.tar.gz
Algorithm Hash digest
SHA256 b78c6e89b9f2135c1e3884583f6be05721b10293424d9ac73ad13ec1f27cdbd5
MD5 2b60d8c30bd71bb7f1fa191fb336cc67
BLAKE2b-256 1d09ee43500331139ebb9ee656ef88be3ca94ddb6c4f2bf41fdccc5c1589c54c

See more details on using hashes here.

File details

Details for the file timespeaker-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: timespeaker-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.4.0-88-generic

File hashes

Hashes for timespeaker-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2e768a893de3832c82e91dafbb758238c700a72c099e3a5d4dc444ff36975961
MD5 6a79ef0ca81bed592c1f49d12e155a27
BLAKE2b-256 670e65dd315c5d0cfbf126c4470b5f67ab968870e4252fe470c5be38f39acc21

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page