erm technically, any websocket TTS, but made for stream.place
Vue 88.5%
TypeScript 5.8%
Shell 2.9%
HTML 2.8%
21 1 0

Clone this repository

https://tangled.org/woovie.net/streamplace-tts
git@tangled.org:woovie.net/streamplace-tts

For self-hosted knots, clone URLs may differ based on your setup.

README.md

streamplace-tts#

Simple stream.place text-to-speech solution using Bun, Vue, Vite, Python, and Piper. As complex as possible for your viewing pleasure.

Requirements#

Setup#

  1. Edit start-piper.sh to your needs.
  2. Copy .env.example to .env and configure your settings (see Configuration below).
  3. Run start-piper.sh
  4. Run <JS preference> run dev (if you use node idk i can't help you i'm a hobbyist who just enjoys bun okay)

Configuration#

Configuration can be set via environment variables (.env file) or URL query parameters. URL parameters take priority over environment variables.

Environment Variables#

Create a .env file with the following variables:

VITE_STREAMPLACE_DID=yourname.bsky.social
VITE_TTS_TIMEOUT=3000
VITE_REPEAT_USERNAMES=false
VITE_CHAT_LIFE=60
  • VITE_STREAMPLACE_DID - Your stream.place username (required)
  • VITE_TTS_TIMEOUT - Milliseconds to wait before enabling TTS after connection (default: 3000)
  • VITE_REPEAT_USERNAMES - Whether to repeat usernames for consecutive messages from same user (default: false)
  • VITE_CHAT_LIFE - How long chat messages stay on screen in seconds (default: 60)

URL Parameters#

Override any setting by adding URL parameters:

http://localhost:5173/?username=yourname.bsky.social&ttsTimeout=5000&chatLife=120&repeatUsernames=true
  • ?username= - Override VITE_STREAMPLACE_DID
  • ?ttsTimeout= - Override VITE_TTS_TIMEOUT
  • ?chatLife= - Override VITE_CHAT_LIFE
  • ?repeatUsernames= - Override VITE_REPEAT_USERNAMES (use true or false)

All parameters are validated - invalid values fall back to environment variables, then defaults.

Needs and wants#

  • Volume slider
  • Environment variables (Vite can pass them to the client as needed) for settings
  • Dedupe repeat usernames for multiple messages in chat from one person
  • Alter chatter username to remove common social sites postfix (.bsky.social)
  • Make it work as an OBS chat overlay too?
    • Implement as a flag feature
  • Expose settings on mousemove event
  • Detect if mouse on screen, display settings UI
    • Fix associated bugs (input just breaks)
  • Ensure env vars actually exist and have some sane defaults
  • Support URL query parameters for configuration
  • Check for errors in connecting to the websocket properly
  • Somehow get rid of piper with something better if possible?
  • Enable !voice to switch voice model
  • Get message replied to for extra context
    • Implement as a flag feature
  • Document full aspects of the TTS timeout value and implications caused by making it too short or too long
  • Add cool text effects that are user selectable
  • Build list of known subdomains for TTS (.bsky.social for example)
  • Use actual time split for chat removals
  • Prevent audio from playing over top each other

My Code Is Your Code#

If you want a change, make a PR. I made this for free in my spare time, you can make edits and make PRs too.

Credits#

Fonts#