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/.
5.0 KiB
Local Services
Every network endpoint the cogs use, with the exact contract from the source. An address marked fixed is compiled into the code and can only be changed by editing and reloading the cog.
Port table
| Port | Service | Used by | Address source | Protocol |
|---|---|---|---|---|
| 2333 | Lavalink node | YTAudio, TtsToy | Fixed, localhost, password youshallnotpass |
WebSocket and HTTP |
| 5006 | Piper HTTP server | TtsToy | Config piper_api_url |
HTTP |
| 8097 | TtsToy health server | Nothing in the repo | Fixed, binds 0.0.0.0 |
HTTP |
| 8098 | TtsToy web UI | TtsToy login command | WEBUI_PORT environment variable, default 8098 |
HTTP |
| 8099 | Chatterbox TTS server | TtsToy | Config chatterbox_api_url |
HTTP |
| 8200 | NLLB translation server | Transcribe | Fixed | HTTP |
| 8201 | Whisper transcription server | Transcribe | Fixed | HTTP |
| 11434 | Ollama, OpenAI-compatible | Assistant | Default base URL, configurable | HTTP |
| 33001 | DECTalk server | TtsToy | Config dectalk_api_url |
HTTP |
| 33002 | Morshu server | TtsToy | Fixed | HTTP |
| 33003 | VOX service port | TtsToy | Declared but unused by the current renderer | HTTP |
Contracts
Lavalink on 2333
YTAudio calls lavalink.initialize(bot, host="localhost", password="youshallnotpass", port=2333, timeout=30, secured=False). It retries five times with two second pauses on timeout and stops for other errors. Playback uses Lavalink's local source, which reads a file path rather than a URL, so the node must have the local source enabled and must share a filesystem with the bot process.
Whisper on 8201
POST /transcribe as multipart form data:
| Field | Value |
|---|---|
file |
audio bytes with the original filename and content type |
task |
translate or transcribe |
vad |
always true |
language |
omitted by Transcribe, so the service detects it |
Response is JSON. Transcribe reads text, language, and language_probability. Translation to English, or a request with no target language, uses task=translate and needs no second service.
NLLB on 8200
POST /translate with a JSON body:
{"text": "...", "source": "fr", "target": "de"}
Response is JSON with a translation field. The source and target accept ISO codes and FLORES-200 tags such as zho_Hans.
Piper on 5006
TtsToy posts to /synthesize with {"text": "...", "voice": "<model id>"}. The voice key is omitted when no model is configured. The response body is WAV audio, which TtsToy writes to disk and then converts or concatenates.
The [p]ttstoy pipervoice listing calls GET /voices, which may return a dict of model ids or a list of objects with key or name. A model whose .onnx exists in the server's data directory can be selected even when it is missing from that listing.
Chatterbox on 8099
| Endpoint | Purpose |
|---|---|
POST /tts |
Synthesis, JSON body with text, voice_mode: predefined, predefined_voice_id, output_format: wav, split_text: false, plus optional temperature, exaggeration, speed_factor |
POST /upload_predefined_voice |
Multipart files upload, returns uploaded_files and errors |
DELETE /delete_predefined_voice/<filename> |
Remove a reference clip |
GET /api/ui/initial-data |
Reachability check used by [p]chatterbox url and [p]tts |
GET /openapi.json |
Route check that confirms /tts exists |
GET /api/model-info |
Current model name, class and load state |
POST /save_settings |
Set model.repo_id |
POST /restart_server |
Hot swap the model |
DECTalk on 33001
TtsToy posts the same payload shape it uses for MiniMax to /v1/t2a_v2, with a hex encoded audio field in the response. GET /health is used for the reachability check in [p]tts and [p]ttstoy dectalkurl.
Morshu on 33002
GET /say?text=... returns MP3 bytes. When the service is unreachable, TtsToy falls back to the in-process Morshu engine, which requires g2p_en, numpy and pydub.
Ollama and other OpenAI-compatible backends
POST <base_url>/chat/completions with model, messages, temperature, and optionally max_tokens and reasoning_effort. GET <base_url>/models powers [p]assistant models. A base URL containing 127.0.0.1 or localhost is treated as keyless.
Health server on 8097
TtsToy starts a threaded HTTPServer bound to 0.0.0.0:8097 when the cog loads. It answers GET /health with {"status": "ok", "service": "ttstoy"} and returns 404 for every other path. It sends Access-Control-Allow-Origin: *. Nothing in the bot uses it; it exists for external monitoring.
External APIs
| Service | Cog | Notes |
|---|---|---|
https://1001albumsgenerator.com/api/v1/groups/<slug> |
AlbumOfTheDay | 15 second timeout, HTTPS required by the seturl command |
https://status.playit.gg/api/getMonitorList/AxwIw5PSiW |
PlayitStatus | Fixed monitor list ID |
https://api.minimax.io/v1/t2a_v2 |
TtsToy | Requires an API key |
| Discord CDN | ImageGrab, Transcribe, Assistant | Attachment downloads |