# 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 ` ## 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 ` | Upload a voice clip (attach file or paste URL) | | `[p]chatterbox removevoice ` | Remove a voice and delete from server | | `[p]chatterbox sharevoice @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 ` | 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//` to customize. ## Requirements - RedBot 3.5+ - Audio cog loaded - ffmpeg - `requests`, `g2p_en`, `numpy`, `pydub` (pip)