diff --git a/README.md b/README.md index 98f7003..81300c2 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,33 @@ A simple Twitch TTS bot (Web Speech API) -## Installation +## Description -Clone the repo (or fetch the [latest Release](https://gitlab.com/gpvkt/twitchtts/-/releases)), move/copy `./dist/tts.exe` into the main directory. Rename `config-dist.yml` to `config.yml` +The goal of this project is to provide a simple to use Text to Speech IRC bot. It's mainly focused on Twitch, but might be easily adapt to other IRC chats as well. Anyway, right now some parts are Twitch specific (like `CAP REQ :twitch.tv/commands twitch.tv/tags`). There are some other projects providing TTS for IRC based chats, like [IRC Radio (TTS)](https://play.google.com/store/apps/details?id=com.earthflare.android.ircradio&hl=en&gl=US), but they are missing moderation features like Black-/Whitelists or deletion of single messages, before they are read. Therefore I created my own TTS bot, providing those features. -## Configuration +The project consits of a very simple IRC client, which monitors the incoming messages. If a valid​⃰ `!tts` command is detected the message will send into a queue. Depending on your config it will wait there a few seconds for deletion by you/your moderators. If nobody deletes the message, it will send into another queue. This queue will get fetched by the HTML frontend, which will be delivered by an internal webserver (backend). The HTML frontend will use the [Web Speech API](https://wicg.github.io/speech-api/) included in any modern webbrowser to read the incoming TTS message. When this is done it will report back to the webserver and the message will be removed from the queue. + +The server part is written in Python. The TTS part is written in Javascript. + +By using Javascript for the actual TTS part it's not only very easy to access the Web Speech API and the underlying Speech features of your OS, it also makes it possible to use a wide range of devices to actually play the TTS output. You can start the backend on your PC/Server and open the frontend on your Android/iOS tablet or Mobile Phone. If you expose the backend to the internet (I would recommend to use a reverse proxy, rather than exposing the backend directly) you can also use the TTS bot on the go (e.g. your IRL setup). + +(⃰sender is not on the blacklist, message is not too long, etc.) + +## Getting Started + +### Dependencies + +* Browser with Web Speech API support +* Web Speech API Voices (usually already included in your OS and/or browser) +* If you use `tts.py` see `requirements.txt`. If you use `tts.exe` all dependencies are included. + +### Installing + +1. Clone the repo, or download and unzip the newest [Release](https://gitlab.com/gpvkt/twitchtts/-/releases) +2. Rename/copy `config-dist.yml` to `config.yml` +3. Move/copy `./dist/tts.exe` into the main directory (you can omit this step if you have Python installed) + +### Configuration Adapt `config.yml` to your needs. Example: @@ -104,7 +126,7 @@ To disable the whitelist, remove it from `config.yml` completely. If you just le Please note: Usernames MUST be lowercase. -## Usage +### Executing program Execute `tts.exe` (or `tts.py` if you have Python installed), open the TTS webpage in your browser (the URL depends on your `bind` and `port` configuration, usually it's just http://localhost). Click the `Init` button at the button of the TTS webpage (you should hear `Init complete`). @@ -117,9 +139,18 @@ Additional commands (broadcaster and mods only) are: * `!dtts `: Disable TTS for the given user * `!ptts `: Allow TTS for the given user -# Voices +## Build -The voices available depends on your Operating System and/or browser. On some systems only a default voice is available and the `Select voice` dropdown might stay empty or will only show entries after you clicked the `Init` button. Some Android devices will show a huge list of voices, but sounds the same no matter which one you choose. +If you prefer to build your own `tts.exe` instead of using the shipped one, you can do as follows: + + * Install Python 3 + * Install pyinstaller: `pip install pyinstaller` + * Install the required dependencies: `pip install -r requirements.txt -v` + * Create the executeable: `pyinstaller --onefile tts.py` + +## Voices + +The voices available depend on your Operating System and/or browser. On some systems only a default voice is available and the `Select voice` dropdown might stay empty or will only show entries after you clicked the `Init` button. Some Android devices will show a huge list of voices, but sounds the same no matter which one you choose. On Windows you can install additional voices via `Settings` > `Time & language` > `Speech` > `Add voices` or by simply run `Add speech voices`. @@ -133,11 +164,11 @@ Feel free to use the [Issuetracker](https://gitlab.com/gpvkt/twitchtts/-/issues) ## Version History -See `CHANGELOG.md`. +See `CHANGELOG.md` ## License -This project is licensed under the GPLv3 License - see the `LICENSE.md` details. +This project is licensed under the GPLv3 License - see `LICENSE.md` for details. ## Acknowledgments