Files
scrapyard-cogworks/ttstoy/README.md
T
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

4.5 KiB

TTS Toy

A RedBot cog for text-to-speech in voice chat with multiple TTS engines, emoji sound effects, and voice cloning.

Modes

Mode Description Requires
minimax MiniMax cloud API, natural voices API key
chatterbox Local Chatterbox server, AI voice cloning Chatterbox server
dectalk Classic 1980s robotic voice DECTalk server
morshu Morshu from CD-i Zelda g2p_en, numpy, pydub
vox Black Mesa VOX announcer Built-in
piper Local Piper neural TTS, fast voices Piper HTTP server

Switch modes: [p]ttstoy mode <mode>

Quick Start

[p]ttstoy mode chatterbox
[p]chatterbox addvoice MyVoice          (attach .wav/.mp3 or paste a URL)
[p]tts Hello world [laugh] this is cool

Commands

Use [p]ttstoy to see all available commands for the current mode.

Chatterbox Voice Management

Command Description
[p]chatterbox addvoice <name> Upload a voice clip (attach file or paste URL)
[p]chatterbox removevoice <name> Remove a voice and delete from server
[p]chatterbox sharevoice <name> @User Share a voice with another user
[p]chatterbox myvoices List your voices
[p]chatterbox temp [0.0-1.5] Per-voice randomness (per voice per user)
[p]chatterbox exag [0.25-2.0] Per-voice expressiveness (per voice per user)
[p]chatterbox volume [-20-20] Per-voice dB loudness offset (per voice per user)
[p]chatterbox guide Full feature guide
[p]chatterbox model [turbo|original] Switch Chatterbox model (owner)
[p]chatterbox url [url] Set Chatterbox server URL (owner)

Append reset to temp, exag, or volume to clear the setting.

General

Command Description
[p]tts <text> Speak in voice chat
[p]ttstoy myvoice [name] Set or view your personal voice
[p]ttstoy voice [name] Set global default voice (owner)
[p]ttstoy mode [mode] Show or set TTS mode (owner)
[p]ttstoy sfxvolume [0-100] Set SFX volume (owner)
[p]sfx List available sound effects
[p]ttstoy info DM setup instructions

DECTalk

Command Description
[p]ttstoy dectalkinstall Install built-in DECTalk server
[p]ttstoy dectalkstart Start server
[p]ttstoy dectalkstop Stop server
[p]ttstoy dectalkstatus Check server status
[p]ttstoy dectalkautotoggle Toggle auto-start
[p]ttstoy dectalkurl [url] Set DECTalk API URL

DECTalk voices are controlled in-text: [:np] Paul, [:nb] Betty, [:nh] Harry, [:nf] Frank, [:nd] Dennis, [:nk] Kit, [:nu] Ursula, [:nr] Rita, [:nw] Wendy.

VOX

Command Description
[p]ttstoy voxpack [vox|vox2] Switch VOX voice pack
[p]ttstoy voxwords List available words

Piper

Command Description
[p]ttstoy piperurl [url] Show or set the Piper server URL (default http://127.0.0.1:5006)
[p]ttstoy pipervoice [model_id] Set the Piper voice model (e.g. en_US-ryan-medium); reset for server default

Piper speaks via a Piper HTTP server's /synthesize endpoint. Any model id whose .onnx is in the server's data dir can be selected, even if it is not in the /voices listing.

Accessibility

Accessibility mode auto-reads the side chat of the voice channel the bot is in (no command prefix needed), using a single engine (dectalk or piper) with emoji SFX disabled. The first message from a user since someone else last spoke is prefixed Name said:; links, images, and files are announced instead of read.

Each speaker is auto-assigned a distinct voice from the active engine's pool so they can be told apart. Users can pick their own voice. Voice assignments are in-memory only and are NOT saved between sessions.

Command Description
[p]ttstoy accessibility start Enable accessibility mode (owner)
[p]ttstoy accessibility stop Disable accessibility mode (owner)
[p]ttstoy accessibility engine [dectalk|piper] Choose the engine (owner); clears per-user voices
[p]ttstoy accessibility voice [name] Pick your own voice for the current engine (auto to be auto-assigned)

Emoji SFX

Include emoji in your TTS text to trigger sound effects:

[p]tts Hello 🎉 world 🔥

Use [p]sfx to see all available triggers. Add .mp3 files to sfx/<folder>/ to customize.

Requirements

  • RedBot 3.5+
  • Audio cog loaded
  • ffmpeg
  • requests, g2p_en, numpy, pydub (pip)