TTS redeems, skip button, per-source chat placement
- Redeem variations can have a TTS voice: the viewer's text is cleaned (links out, repeats collapsed, max length, blocked words -> not read), spoken as "<name> says: ..." and shown as the big paper note; the variation's sound is not played when TTS is on (picker greyed out) - Settings: TTS max length, say-the-name, blocked words (never sent to overlay pages: db.getOverlaySettings) - Dashboard "Skip current alert" -> /alerts/skip -> overlay skips it - db.migrate()/addColumn: new columns on existing databases - Chat: ?chat=left,top,width,height and ?chatflow=up per browser source (e.g. the Intermission panel); default unchanged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b5a81bdb15
commit
4fda6060bf
16 changed files with 228 additions and 28 deletions
10
CLAUDE.md
10
CLAUDE.md
|
|
@ -137,7 +137,15 @@ Chat (`?parts=chat`) is `public/chat/chat.css` + `public/chat/chat.js` (window.H
|
|||
|
||||
## TTS voices (/tts)
|
||||
|
||||
Builder page to make named TTS voices; redeems do not use them yet.
|
||||
Builder page to make named TTS voices, used by redeem variations (Redeems page: "TTS: <voice>" per variation).
|
||||
- Redeem with a TTS voice + viewer text: `redeems.addSpeech()` cleans the text (`tts.prepareViewerText`: links out,
|
||||
repeats collapsed, cut to `settings.tts_max_chars` at a word, `settings.tts_blocklist` -> nothing read, note says
|
||||
"(message removed)"), synthesizes "<user> says: <text>" (`tts_say_name`), and only then sends the alert with
|
||||
`tts` (URL) + `tts_ms`. Shown as the big paper note (style `message`, caption "says:"). TTS on = the variation's
|
||||
sound is not sent (the voice replaces it; the Redeems page greys the picker out). Synthesis errors: the note still shows, silent.
|
||||
- Dashboard "Skip current alert" -> POST `/alerts/skip` -> WS `{type:'alert_skip'}` -> `PolaroidAlerts.skip()`.
|
||||
- `tts_blocklist` never goes to overlay pages: they get `db.getOverlaySettings()` (render and settings_update).
|
||||
- New columns on existing DBs are added by `db.migrate()` (`addColumn`, ALTER only when missing).
|
||||
- `src/tts.js`: `synth(config, text)` -> cached mp3 in `public/tts/<sha1>.mp3` (gitignored, newest 300 kept).
|
||||
Config = up to 3 `layers` (engine `piper`|`espeak`, voice, speaker, speed, pitch in semitones, volume, delay ms)
|
||||
+ `effects` {stadium, echo, crush, radio, robot, chorus, flanger, tremolo: 0..1}. `normalize()` clamps everything
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue