gbp-webhook-tts
A gbp-webhook plugin to speak the name
of a machine or machines when a build is pulled for that machine. See
gbp-notifications. The tts in
gbp-webhook-tts stands for "text to speech".
Installation
gbp-webhook-tts requires gbp-webhook (which requires gbpcli). You should install gbp-webhook-tts in the same (virtual) environment that you installed those two. For example:
$ pip install --user gbp-webhook-tts
or
$ pipx inject gbpcli gbp-webhook-tts
Usage
You should ensure that gbp-notifications is installed on the Gentoo Build
Publisher server for which
you want to subscribe and the webhook receiver is configured to receive
postpull events.
This plugin uses AWS Polly to convert text to
to speech. As such it requires you to have an AWS account and an access
account to AWS Polly. It uses standard AWS
(boto3) environment variables to configure
access to AWS and this can be set in the ~/.config/gbp-webhook.conf file.
For example:
AWS_ACCESS_KEY_ID=QVCLXRFGNHXLJRSXZQZK
AWS_SECRET_ACCESS_KEY=vRgJyuacKhYPdTEzopGEMxrvWDSSWavXGEROZbdY
AWS_DEFAULT_REGION=us-east-2
On the server
# /etc/gbp-notifications.toml
[recipients]
laptop = { webhook = "https://laptop:5000/webhook|X-Pre-Shared-Key=foobar" }
[subscriptions]
babette = { postpull = ["laptop"] }
As gbp-webhook-tts is a plugin for gbp-webhook, it is picked up automatically when that application is run (see the README for details). In order to be picked up it requires a restart of the gbp-webhook service. In systemd this means
$ systemctl restart --user gbp-webhook
Environment variables
Like gbp-webhook, gbp-webhook-tts can be configured via environment variables.
If you are using the (preferred) systemd integration, then they will be
defined in ~/.config/gbp-webhook.conf. The following environment variables
are recognized:
GBP_WEBHOOK_TTS_DELAY: If provided, there will be a delay (in seconds) between the time that the notification is received and the machine name is spoken. The default is0meaning no delay.
In addition environment variables prefixed with GBP_WEBHOOK_TTS_PHONETIC_
will be used to pass a "phonetic" translation to the text-to-speech engine.
This can be used in cases where the spelling and the sound of a machine name
differ, or where the TTS engine misspeaks. For example if one has a GBP
machine called "kde-desktop" one could use the environment variable setting:
GBP_WEBHOOK_TTS_PHONETIC_KDE_DESKTOP="kay-dee-ee desktop"
Cache
gbp-webhook-tts caches the audio received from the TTS engine. This is used to
both speed up the processing and to save on AWS charges. The cached audio is
stored in ~/.cache/gbp-webhook/tts/, for example
~/.cache/gbp-webhook/tts/kde-desktop.mp3. These audio files can be safely
deleted and will be re-created on demand.
Tips
I use this plugin in concert with gbp-webhook-playsound, with a 0.8-second delay. So I effectively get a chime followed by the name of the machine.
Metadata
Release files for gbp-webhook-tts 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gbp_webhook_tts-1.0.2.tar.gz | 7.7 kB | Without provenance | Details for gbp_webhook_tts-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gbp_webhook_tts-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for gbp_webhook_tts-1.0.2-py3-none-any.whl |
Total release size: 13.7 kB
Release files / gbp_webhook_tts-1.0.2.tar.gz
| Download URL | gbp_webhook_tts-1.0.2.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffe4204b3d0dd024e81d3cc28f336edc95bd081c7cf5152672c54df66a452518
|
|
BLAKE2b-256 checksum How to use checksums |
c2851ee6e6e172f9d1c157d732e0eadbdc3d3f387fce0d043fc193f95dda8e38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / gbp_webhook_tts-1.0.2-py3-none-any.whl
| Download URL | gbp_webhook_tts-1.0.2-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cab7c8d505a5255b3b0bf95bc5fac52506f90d48aeae5452b7b191c324f9ce8d
|
|
BLAKE2b-256 checksum How to use checksums |
9613972b94d5545966a6f9f5cf5aaf477fa8ecac79f3958a4302aa5c1fd87b20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for gbp-webhook-tts 1.0.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.