Commit Graph

37 Commits

Author SHA1 Message Date
kingston 5dd4fb9ab4 ttstoy: add universal [p]disconnect command to leave VC 2026-10-19 01:26:56 -05:00
kingston 4023a8c072 ttstoy: skip spam/nonsense messages in accessibility auto-read 2026-10-19 00:33:29 -05:00
kingston 1425a2ca18 ttstoy: label voice list as 'options:' 2026-10-19 00:23:15 -05:00
kingston 7ce817216b ttstoy: simplified voice names and cleaner accessibility voice list layout 2026-10-19 00:22:19 -05:00
kingston 27001a8246 ttstoy: cleaner accessibility voice list with current-voice marker 2026-10-19 00:19:14 -05:00
kingston 2a6278dd79 ttstoy: persist accessibility voices across sessions 2026-10-19 00:18:38 -05:00
kingston b0052456f0 ttstoy: limit piper voice pool to 5 active voices 2026-10-19 00:15:53 -05:00
kingston 9a580dbe28 ttstoy: accept short piper voice names and keep voices stable across VC bounce 2026-10-18 23:30:03 -05:00
kingston 429d7c7a29 ttstoy: keep accessibility voice picks sticky across VC bounce 2026-10-18 23:19:00 -05:00
kingston 63944c6aa8 ttstoy: skip accessibility auto-read for messages starting with '..' 2026-10-18 22:57:01 -05:00
kingston a2516f9b03 ttstoy: accessibility command group with per-speaker voices
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.
2026-10-18 22:51:01 -05:00
kingston dced723fa0 ttstoy: add Piper TTS provider and accessibility engine selector
- 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.
2026-10-18 22:41:26 -05:00
kingston c2fbc09b16 ttstoy: accessibility mode auto-reads VC side chat
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.
2026-10-18 22:33:30 -05:00
kingston 241197b05b ttstoy: fix NameError in tts (audio -> audio_path)
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.
2026-10-18 22:27:41 -05:00
kingston c62d7326d8 ttstoy: remove slash commands, make tts prefix-only
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).
2026-10-18 22:25:28 -05:00
kingston 51df6f7476 ytaudio: add [p]summon to join VC; revert tts join change
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.
2026-09-17 17:33:23 -05:00
kingston 1c6d3c3b5e ttstoy: make tts join behave as a summon
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.
2026-09-17 17:29:36 -05:00
kingston bc2ef8a747 ttstoy: decouple from built-in Audio cog
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.
2026-09-17 17:00:42 -05:00
kingston 2078bb37df style: remove em/en dashes from command help and log text 2026-09-14 18:00:24 -05:00
kingston 6507293554 ttstoy: remove all TTS server management commands from the bot
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.
2026-09-14 14:46:09 -05:00
kingston daaf568162 ttstoy: remove server start/install commands now handled by systemd
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.
2026-09-14 14:43:16 -05:00
kingston 554122da93 ttstoy: decouple TTS services from the bot lifecycle
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.
2026-09-14 14:35:53 -05:00
kingston e71c778f44 docs: webui now separate service; add Grigori MiniMax alias 2026-09-14 12:23:34 -05:00
kingston 7a88dba1e5 refactor: move webui out of cog, use shared-state pending queue
- 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
2026-09-14 11:45:47 -05:00
kingston cb5f26f6c6 fix: route webui internal callbacks to localhost
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.
2026-09-12 22:00:29 -05:00
kingston b81b638f17 fix: trim long chatterbox voice clips to 30s on upload 2026-09-07 23:41:07 -05:00
kingston ab72310adb feat: add VOX TTS server on port 33003 with webui integration
- 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
2026-06-09 11:07:59 -05:00
kingston 9a6568b52c fix: update dectalk_port and morshu_port instance variables to 33001/33002 2026-06-09 11:01:11 -05:00
kingston eca3a4a575 chore: change DECTalk port to 33001, Morshu port to 33002, add AI context file 2026-06-09 10:47:06 -05:00
kingston 19e705d6af Fix post-to-discord checkbox: pass skip_post flag to bot, skip posting when unchecked 2026-06-08 03:24:20 -05:00
kingston be982b4014 morshu-server: report startup errors in Discord 2026-06-06 19:56:16 -05:00
kingston 56aa9d371f morshu-server: use resolved absolute paths and pass env properly 2026-06-06 19:55:17 -05:00
kingston d212dafd6f morshu-server: fix startup by passing env and using sys.executable 2026-06-06 19:48:27 -05:00
kingston 7c595fa84f Add morshu server start/stop/status bot commands 2026-06-05 19:09:36 -05:00
kingston c40ac2cd91 Add standalone morshu-server, update webui to support morshu/dectalk generate 2026-06-05 19:05:00 -05:00
kingston 6626f1af4a Add 'Post to Discord' checkbox for Generate Only mode 2026-06-05 16:58:53 -05:00
kingston 19654952d6 Add ttstoy cog 2026-06-05 16:41:55 -05:00