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.
This commit is contained in:
@@ -11,6 +11,7 @@ A RedBot cog for text-to-speech in voice chat with multiple TTS engines, emoji s
|
||||
| `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>`
|
||||
|
||||
@@ -75,6 +76,29 @@ DECTalk voices are controlled in-text: `[:np]` Paul, `[:nb]` Betty, `[:nh]` Harr
|
||||
| `[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 forces a single robotic/neural engine, disables emoji SFX,
|
||||
and auto-reads the side chat of the voice channel the bot is in (no command
|
||||
prefix needed). The first message from a user since someone else last spoke is
|
||||
prefixed `Name said:`; links, images, and files are announced instead of read.
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `[p]ttstoy accessibility` | Toggle accessibility mode |
|
||||
| `[p]ttstoy accessibilityengine [dectalk\|piper]` | Choose the engine accessibility uses |
|
||||
|
||||
## Emoji SFX
|
||||
|
||||
Include emoji in your TTS text to trigger sound effects:
|
||||
|
||||
Reference in New Issue
Block a user