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).
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.
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.
The dectalk, morshu, and vox servers are managed entirely by systemd now, so
the bot no longer needs to inspect or manage them. Removed the stop and status
commands for all three, the unused dectalk_auto_start config, and the dead
server directory and process attributes. The cog keeps only the fixed ports it
uses to reach the services over HTTP.
Drop the dectalkstart, dectalkinstall, dectalkautotoggle, morshustart, and
voxstart commands along with the orphaned _start/_stop/_install helper methods
and the dectalk mode-switch auto-start path. The three TTS servers run as
independent systemd services; the stop and status commands now point at
systemctl.
The dectalk, morshu, and vox TTS servers now run as independent systemd
services on their fixed ports (33001/33002/33003). The cog no longer spawns
or kills them: start/stop helpers became reachability checks and no-ops, the
cog_load auto-start and cog_unload teardown were removed, and the start/stop/
status commands now point at systemctl. The HTTP client calls are unchanged.
- drop bundled Flask webui (now lives in scrapyard-website TtsToy)
- _take_pending_state_updates: pop pending commands/posts + refresh user
info under cross-process lock, matching the webui-side producer
user_guild_map was only written when a login token was consumed on the
webui login page. Users on stale session cookies never re-login, so
their jobs carried empty guild_id and TTS was posted to whatever global
channel happened to match instead of the server they logged in from.
Persist the guild as soon as the bot registers the token so
_resolve_guild_id() falls back to the correct login guild.
The bot posts job-status updates and login-token registration to the
public webui URL (ttstoy.kingstons-scrapyard.net) with a 5s timeout.
Under load, that WAN hop times out and jobs stay stuck 'pending' even
though audio was generated. Since the webui runs as a child process of
the bot on the same host, use http://127.0.0.1:8098 for these
server-to-server callbacks instead.
- New vox-server/server.py (HTTP API matching morshu-server pattern)
- Added voxstart/voxstop/voxstatus commands to ttstoy cog
- WebUI /api/tts/generate and /api/mc/tts now support VOX mode
- Cog_unload stops VOX server automatically