Accessibility mode always announced images, files and links posted
without the `..` trigger. Owners can now turn that off with
`ttstoy accessibility posts <on|off>`, leaving only triggered messages
read aloud.
The notice could survive beside a finished transcript, leaving a take a
moment message under a completed reply. The typing indicator covers the
wait, so drop the separate notice and its cleanup task.
Discord keeps forwarded attachments in message snapshots, so the old
top-level attachment check reported no media for a forwarded voice message.
Check snapshots wherever media is looked up and label the origin note.
Long clips and slow CPU inference leave users staring at a typing indicator.
Post a short note after three seconds of work and remove it when the request
finishes, so short messages stay quiet.
Accessibility mode speaks only `..`-triggered messages, so a posted image or
link went unmentioned and listeners could not follow the side chat. Those
posts are now announced regardless of the trigger, and the name prefix is
skipped for them because the announcement already names the speaker.
Accessibility mode read every message in the voice channel side chat and
treated `..` as an opt-out, so ordinary chat was always spoken. Members now
trigger speech explicitly with `..`, and messages without the trigger are
never read.
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/.
Completes the video-source fix: the command help and README still promised a
25-message scan, and the low-confidence branch was missing the message
provenance line the other replies carry.
A video that did not match the extension list made _find_attachment scan 25
messages back and silently resend the previous clip, so every request
transcribed the same audio (visible in the service log as repeated 15.4s and
4.7s durations). Accept video containers, which Whisper decodes the audio track
from, restrict the fallback to the message immediately before, and state which
message was transcribed in the reply.
langdetect labels 'ok' as Slovak with high confidence, so the probability gate
alone was not enough. Require 12+ characters before guessing, and document the
translate command in the README.
Reply to any message with '[p]translate spanish' to translate it. The source
language is detected with langdetect and the command refuses to translate when
detection is ambiguous, pointing at the explicit 'from <language>' form rather
than guessing.
'zh-Hant' was stripped to 'zh' and silently produced Simplified output. Map
the script variants explicitly and let FLORES-200 tags pass through to NLLB,
which validates them itself.
Irish, Javanese and Latin mapped to codes with no display name, so a reply
header would have shown a raw ISO code. A reply to a message outside the
25-message cache also fell through to the newest voice message instead of the
one the user actually replied to.
Voice messages become text via the local whisper-server, with optional
translation through nllb-server. English uses Whisper's own translate task so
the common case needs no second model; other targets transcribe first and
translate after, and skip translation when Whisper's language confidence is
too low to trust.
Consolidate accessibility into one command group:
ttstoy accessibility start
ttstoy accessibility stop
ttstoy accessibility engine <dectalk|piper>
ttstoy accessibility voice [name|auto]
Per-speaker distinct voices so concurrent users in accessibility auto-read
can be told apart:
- Auto-assigned round-robin from the active engine's voice pool (9 DECTalk
named voices, 19 Piper models), guaranteeing distinct voices until the
pool is exhausted (then wraps).
- Users set their own voice with 'accessibility voice <name>', 'auto' to
return to auto-assignment.
- Assignments are in-memory only and are NOT saved between sessions; they
reset on start/stop, engine change, and when the bot changes voice channel.
- dectalk voice travels as voice_id, piper voice as the model id.
- New 'piper' TTS mode backed by a Piper HTTP server (/synthesize),
wired through the single-mode and multi-voice render paths with the
same SFX-segment handling as other providers.
- _save_piper_tts renders via POST /synthesize {text, voice}, optional
model_id voice and dB volume offset.
- Config: piper_api_url (default http://127.0.0.1:5006), piper_voice,
accessibility_engine (dectalk or piper).
- Commands: ttstoy piperurl, ttstoy pipervoice, ttstoy accessibilityengine.
- Accessibility mode (both the forced-engine command path and the VC
auto-read listener) now uses the configured engine, dectalk or piper.
- mode command validation/listing/confirmation include piper.
- README documents the piper mode and accessibility engine.
When accessibility mode is on and the bot is in a voice channel, every
new message in that VC's integrated text chat is spoken via DECTalk with
no command prefix needed.
- Prefix 'Name said:' only on a user's first message since another user
last spoke (interrupted), tracked per guild in memory and reset when
the bot changes voice channel.
- Attachments/embeds/links are announced, not read: 'username sent a
link' / 'sent an image' / 'sent a file'.
- Strips all emoji (unicode and custom) from spoken content. No emoji,
no em-dash in any output.
- Skips bot messages and valid command invocations.
The VC-playback guard referenced an undefined variable 'audio',
crashing every [p]tts invocation with NameError. Use audio_path,
which is the generated mp3 path set just above.
Change tts from commands.hybrid_command to commands.command so it no
longer registers an app (slash) command, and drop the ctx.interaction
reply branch (always react_quietly now).
Lavalink's local loader rejects FIFOs and nonexistent files, but loads a
regular file instantly even while it grows. Spawn yt-dlp with -o - writing
into a pre-created regular file, wait until >=64KB is present, then load the
path so the node's ffmpeg decodes it live. Skipping kills the process and
deletes the file; falls back to mp3 download if streaming fails.
The cog's vision_model defaulted to the text-only llama3.2:3b, so any image in
the message/reply was sent to a non-vision model, causing Ollama 400 'invalid
image input'. Now the bot tells the user images aren't supported and continues
with text-only, preserving normal chat.
Replace the drained asyncio.Queue with an explicit, always-inspectable
model: GuildPlayer.pending (waiting tracks) + current (now playing).
- queue command shows Now playing plus numbered Up next list
- play reports queue position when adding behind an active track
- stop/leave use clear_pending(); skip relies on the TRACK_END event to
advance exactly one track (no double-skip)
- queue alias q, nowplaying alias np
Add a summon command (alias ytjoin) that joins the caller's voice
channel, replacing the old Audio-cog summon. _ensure_connected now
moves the bot with Player.move_to when it is already in a different
channel. Revert the ttstoy tts join back to the simple connect.
Connect to the caller's voice channel when the bot is not in voice, and
move to the caller's channel if the bot is currently in a different one
(via Player.move_to). Previously it only connected when the bot had no
voice state, so it would not follow the user between channels.
Post a status message on play and live-edit it with the download
percentage via a throttled yt-dlp progress_hook (max one edit/sec,
scheduled onto the event loop from the executor thread). Shows
Downloading (N%), then Converting to mp3, then Now playing. Removed all
emoji and em-dashes from user-facing strings and comments.
The Minecraft cog already registers top-level 'join' and 'leave', which
caused a CommandRegistrationError. Namespace these two commands under a
yt-prefix (ytjoin, ytleave, alias ytdc).
Use the shared Red-Lavalink client directly instead of depending on
redbot.cogs.audio: import lavalink; connect via lavalink.connect();
gate WebUI playback on lavalink.get_all_nodes() instead of
get_cog('Audio'). Playback (get_player pause/save/restore) unchanged.
The lavalink client is now owned by the YTAudio cog.
Standalone cog that owns the Red-Lavalink client connection
(initialize on startup, close on unload) and plays YouTube/yt-dlp
sources by downloading audio, transcoding to mp3, and playing through
Lavalink's local source. Per-guild queues, multi-VC capable. Commands:
play, skip, stop, pause, resume, queue, nowplaying, volume, join, leave.
Make the API base URL configurable (new global config base_url, default to the
local Ollama OpenAI-compatible endpoint http://127.0.0.1:11434/v1 on gpu1).
Local endpoints (127.0.0.1/localhost) need no API key: the on_message, _chat,
and models guards allow a missing key when local, and the Authorization header
is only sent when a key is set. Default guild model is now
llama3.2:3b-instruct-q4_K_M with a humor-focused system prompt. Adds
[p]assistant baseurl to switch endpoints (omit to reset to local), shows the
backend in settings, and raises the request timeout to 120s for local
inference. GreenPT remains usable as a fallback by setting the base URL back to
it and providing a key.
Note: Llama-3.2-3B-Instruct is text-only; the vision path needs a
vision-capable model (e.g. a local llava/llama3.2-vision) or GreenPT.