26a0728e14
The root README carried the full ten cog manual while the wiki held the authoritative pages. Point the repository at the wiki, keep only install and catalog basics in the README, and remove the per cog documents that are now folded into wiki source under wiki/.
79 lines
3.5 KiB
Markdown
79 lines
3.5 KiB
Markdown
# Installation
|
|
|
|
## Bot requirements
|
|
|
|
- Red-DiscordBot 3.5.0 or newer.
|
|
- Python 3.11 or newer. AutoRoom and Transcribe use syntax and standard library modules that do not exist on older versions.
|
|
- `ffmpeg` on the PATH. YTAudio calls it for mp3 conversion, TtsToy calls it for volume adjustment, and Chatterbox reference clips are decoded with pydub, which also needs ffmpeg.
|
|
- A Lavalink node on `localhost:2333` for YTAudio and TtsToy. The connection parameters are hardcoded in `ytaudio/ytaudio.py`.
|
|
|
|
## Adding the repository
|
|
|
|
```
|
|
[p]repo add scrapyard http://192.168.0.200:3000/kingston/scrapyard-cogworks.git
|
|
[p]cog list scrapyard
|
|
```
|
|
|
|
## Installing a cog
|
|
|
|
Each cog installs on its own, which lets Red install only that cog's Python requirements.
|
|
|
|
```
|
|
[p]cog install scrapyard transcribe
|
|
[p]load transcribe
|
|
```
|
|
|
|
Repeat with any of `albumoftheday`, `assistant`, `autoroom`, `deadman`, `imagegrab`, `playitstatus`, `renamer`, `ttstoy`, `ytaudio`.
|
|
|
|
## Load order
|
|
|
|
YTAudio owns the process-wide Lavalink client. It calls `lavalink.initialize()` when the bot becomes ready and `lavalink.close()` when it unloads. TtsToy only calls `lavalink.get_player()` and relies on that connection.
|
|
|
|
Install and load YTAudio before TtsToy so the node is connected when TtsToy first needs to play audio. If a different cog has already connected a node, YTAudio detects it with `lavalink.get_all_nodes()` and shares the connection instead of initializing a second one.
|
|
|
|
## Python packages
|
|
|
|
Declared in each `info.json`:
|
|
|
|
| Cog | Packages |
|
|
|---|---|
|
|
| albumoftheday | `aiohttp` |
|
|
| assistant | `aiohttp` |
|
|
| autoroom | `func-timeout`, `jinja2` |
|
|
| deadman | none beyond Red |
|
|
| imagegrab | `aiohttp` |
|
|
| playitstatus | `aiohttp` |
|
|
| renamer | none beyond Red |
|
|
| transcribe | `aiohttp`, `langdetect` |
|
|
| ttstoy | `requests`, `pydub`, `g2p_en`, `numpy`, and optionally `pynacl` for voice |
|
|
| ytaudio | `yt-dlp`, `PyNaCl`, `lavalink` (provided by Red) |
|
|
|
|
`aiohttp` and `discord.py` are already present in a Red installation. Red installs `info.json` requirements automatically when the cog is installed, so install each cog rather than copying its directory into `cogs/` by hand.
|
|
|
|
## Local services
|
|
|
|
Several cogs expect services on fixed ports. [Local Services](Local-Services) lists all of them with their endpoints. A cog that cannot reach its service reports a connection failure and stops; it does not fall back to a different provider.
|
|
|
|
The following addresses are compiled into the source and cannot be changed with a command:
|
|
|
|
- Transcribe: Whisper at `http://127.0.0.1:8201`, NLLB at `http://127.0.0.1:8200`.
|
|
- YTAudio: Lavalink at `localhost:2333` with password `youshallnotpass`.
|
|
- TtsToy: health server binds `0.0.0.0:8097`, DECTalk defaults to `http://127.0.0.1:33001`, Morshu to `http://127.0.0.1:33002`, VOX to port `33003`.
|
|
|
|
The following addresses are configurable at runtime: TtsToy Chatterbox and Piper URLs, Assistant base URL, AlbumOfTheDay group URL, and PlayitStatus channel.
|
|
|
|
## Minimum setup per cog
|
|
|
|
| Cog | Minimum setup |
|
|
|---|---|
|
|
| AlbumOfTheDay | `[p]aotd seturl`, `[p]aotd setchannel` |
|
|
| Assistant | none on a local Ollama backend, otherwise `[p]assistant setkey` and `[p]assistant baseurl` |
|
|
| AutoRoom | `[p]autoroomset create <source> <category>` |
|
|
| Deadman | none, arm with `[p]deadman arm` |
|
|
| ImageGrab | none |
|
|
| PlayitStatus | `[p]playit channel <channel id>` |
|
|
| Renamer | none |
|
|
| Transcribe | Whisper and NLLB servers running |
|
|
| TtsToy | `[p]ttstoy mode` plus the engine server, or a MiniMax key |
|
|
| YTAudio | Lavalink running |
|