Skip to content

Latest commit

 

History

History
298 lines (188 loc) · 13.1 KB

README.md

File metadata and controls

298 lines (188 loc) · 13.1 KB

Talk Calendar (espeak version)

Talk Calendar is a personal desktop calendar for Linux with speech capability. It has been developed using C and GTK4 and uses the espeak text-to-speech synthesizer to read out event information and upcoming events.

A screenshot is shown below.

Core Features

  • built with C and GTK 4.14.4 (Fedora 40)
  • bespoke custom calendar which allows dates with events to be colour marked
  • event details, location, start and end time can be entered and edited
  • multiday events can be created
  • priority, is-yearly and notifications can be used
  • reads out events details and upcoming events
  • event search
  • Sqlite3 database used to store events

Local Install Using Prebuilt Binary

A 64-bit prebuilt binary for the latest version of Talk Calendar is available and can be downloaded from the binary directory. This has been built using GTK 4.14 and tested with both Fedora 40 and Ubuntu 24.04 LTS. With Debian 12 you will need to make some source code changes (see below) and build from source as it uses the older GTK 4.8.

Extract the downloaded file which contains the Talk Calendar executable. Assuming that the GTK4 base libraries are installed the Talk Calendar binary can be run from the terminal using:

./talkcalendar

or double click on the "talkcalendar" file. Talk Calendar must have executable permissions to execute. Right click it and choose Properties->Permissions and tick allow "Executable as Program".

To add Talk Calendar to the system menu modify the "talkcalendar.desktop" file provided in the download using your user name and application location and copy it to the .local/share/applications/ directory. This way of installing Talk Calendar should be universal across distros.

With this version of Talk Calendar you must install espeak for speech synthesis. With Fedora, espeak is installed as shown below.

sudo dnf install espeak

With Ubuntu and Debian, espeak is installed as shown below.

sudo apt install espeak

Calendar Usage

If you have used a calendar app before then using Talk Calendar will be straight forward.

Adding New Event

  • Select event date using the calendar
  • Select "Event->New Event" from the menu or press Ctrl+n to invoke the "New Event" window
  • Enter the event summary (e.g. birthday)
  • Enter description (optional)
  • Enter the location (optional)
  • The start date is the calendar selected date
  • If the event is over a number of days (e.g. holiday) tick the multiday check box and enter the end date
  • Enter start and end times (or tick the all day check box)
  • Events are sorted by start time when displayed
  • Navigate through the year using the calendar to add events

A screenshot of the new event dialog is shown below.

When a creating a new event you can check "Send Notification" which will send a system notification when Talk Calendar is started on the day in which the event occurs.

Editing Existing Event

  • Select the event in the list view and either select "Event->Edit Selected Event" from the menu or press Ctrl+e
  • Change details as required

Searching for an Event

  • Select "Event->Search from the menu
  • Enter search term or location

Changing Calendar Colours

  • Select the calendar colour window using Calendar->Colours from the menu
  • Enter the HTML colour name for changing the today, event and holiday calendar colour marks

A list of HTML colour names can be found here. Most of the major colour names have been implemented (see attached colour name list) which should be sufficient if using either a light or dark legacy desktop colour theme.

Preferences

  • Select Calendar->Preferences from the menu or use Ctrl+Alt+p to invoke the preferences window (see screenshot below)
  • Change options as required

You can use 12 hour format. Event end-times can also be shown in the list view. If notable dates is selected then the date label shows special calendar dates such as some UK public holidays. These are also spoken.

Talk options can be changed.

Talking

  • Press spacebar to speak event details.

Information

  • Select "Help->Information from the menu or press F1
  • the information window shows the keyboard shoutcuts, how many records are in the database, the Sqlite version being used on the system, checks if espeak installed, the desktop font and scale factor.

  • Use the About dialog to display current version.

Keyboard Shortcuts

Ctrl+n            New Event
Ctrl+e            Edit Selected Event
Delete            Delete Selected Event
Ctrl_Alt+p        Preferences window
Spacebar        Speak
t            Speak Time
F1            Information

Startup Applications

Add Talk Calendar to your start-up programs to read out the date and any event details when the computer is switched on.

With GNOME based desktops use the GNOME "Tweak Tool" to add Talk Calendar to your startup applications if required.

Events Database

Events are stored in an Sqlite database. SQLite is a small, fast and full-featured SQL database engine written in C.

Backup Restore Events Database

A first attempt of a backup and restore system has been implemented in case the Sqlite events database becomes corrupted (e.g. by using another external program to open it or by attempting to vacuum it). You should backup your events by using the export to CSV file menu item which will create an "events.csv" file in the working directory (keep this safe and make another copy if necessary). If you then corrupt your database, you can clear all events from the Sqlite database and then use the import from CSV restore option which assumes that the "events.csv" file is in the current working directory. If you completely corrupt your Sqlite database called calendar.db then rename it and restart Talk Calendar which will create a new empty database and restore into this.

I have not tested what will happen if you attempt to vacuum your database externally and then restart Talk Calendar with this.

Build From Source

The C source code for the Talk Calendar application is provided in the src directory. Fedora 40 has been used to compile the project. Fedora 40 uses GTK 4.14.

Geany can be used as a source code editor for opening, viewing and then compiling the Talk Calendar C code. Geany is lightweight and has an integrated terminal for building the application.

To build Talk Calendar from source you need the gcc compiler, GTK4, GLIB, SQLITE and libnotify development libraries.

Building on Fedora 40

With Fedora you need to install the following packages to compile Talk Calendar.

sudo dnf install gcc make
sudo dnf install gtk4-devel
sudo dnf install gtk4-devel-docs
sudo dnf install glib-devel
sudo dnf install alsa-lib-devel
sudo dnf install sqlite-devel
sudo dnf install libnotify-devel
sudo dnf install espeak

To check the installed Sqlite 3 version use the command below.

sqlite3 --version

To check the installed version of the GTK4 development libraries use the command below.

dnf list gtk4-devel

Use the MAKEFILE to compile.

make

To run Talk Calendar from the terminal use

./talkcalendar

Building Debian Bookworm

With Debian Bookworm (and Ubuntu) and you need to install the following packages to compile Talk Calendar.

apt install build-essential
apt install libgtk-4-dev
apt install libasound2-dev
sudo apt install sqlite3
sudo apt install libsqlite3-dev
sudo apt install espeak

The packages:

apt install libglib2.0-dev
apt install alsa-utils

are needed but should be installed by default.

Debian 12 Bookworm uses the older GTK 4.8.3 amd64 library and so you need to make some changes to the source code for the project to compile. For example, you need to replace "gtk_css_provider_load_from_string" with "gtk_css_provider_load_from_data". The function gtk_css_provider_load_from_data has been depreciated in GTK 4.12 and beyond. I have left some comments in the code where changes are required.

To determine which version of GTK4 is running on a Debian system use the following terminal command.

dpkg -l | grep libgtk*

Building on Solus Linux

To build Talk Calendar on Solus Linux (tested with Solus 4.5 Budgie) you need to install the development packages below. Solus is an independent Linux distribution not based on either Debian or Fedora and has its own package manager called "eopkg". To install development tools on Solus linux including gcc you need to install the system.devel package. You also have to install the GTK4, SQLite3, libnotify and the ALSA development libraries as shown below.

sudo eopkg install -c system.devel
sudo eopkg install libgtk-4-devel
sudo eopkg install sqlite3-devel
sudo eopkg install libnotify-devel
sudo eopkg install alsa-lib-devel
sudo eopkg install espeak

Use the Makefile to build Talk Calendar as shown below.

make

To run Talk Calendar use the following.

./talkcalendar

Notifications

Startup day event notifications have now been implemented using libnotify. This library is an implementation of the Desktop Notifications Specification which provides support for GTK and Qt applications and is desktop independent.

I have developed a small GTK4 notification tester app which can be found here with screenshots and notes for Debian GNOME (Wayland) and Debian Budgie (X11) testing. I found that GNotification code works on Debian Budgie (X11) but not on Debian GNOME (Wayland). Consequently, I am currently using libnotify for implementing notifications in Talk Calendar.

Speech Synthesis

This version of Talk Calendar uses espeak as the back-end speech synthesizer.

The original version of Talk Calendar used its own built-in word concatenation speech synthesizer which provides the basic functionality of reading dates, times and event keywords so that the whole application is self contained. However, the use of espeak provides more versatility allowing for event details and locations to be spoken. I have experimented with other types of speech synthesizer approaches such as my own diphone speech synthesizer and a formant speech synthesizer but I could not achieve the same level of audio pronunciation quality that is possible with the simple word concatenation approach or by using espeak.

Both projects (talkcalendar and talkcalendar-espeak) have been developed using C and GTK4 with Debian and Fedora.

Versioning

SemVer is used for versioning. The version number has the form 0.0.0 representing major, minor and bug fix changes.

Author

Project Status

Active.

License

GTK is released under the terms of the GNU Lesser General Public License version 2.1. The espeak speech synthesizer is released under the terms of the GNU GENERAL PUBLIC LICENSE Version 3. The LGPLv2.1 license used by GTK is compatible with the GPLv3 license as used by espeak as shown in the (L)GPL compatibility matrix. TalkCalendar-espeak is released under the GPLv3 license for compatibility.

Acknowledgements