DEV Community

Cover image for Adding TTS to the Twitch Shoutout Bot [Live Coding Recap]
💾 bun9000
💾 bun9000

Posted on • Edited on

1 1

Adding TTS to the Twitch Shoutout Bot [Live Coding Recap]

Streamed: 10/9 on Twitch

🚨 Streamer tool upgrade! During this live coding session, we added TTS functionality to the Twitch Shoutout Bot!

StarProject Repository
💜 Follow ⇒ on Twitch and GitHub
🔴 WatchTwitch VOD (replay)

Topic(s): Creating a single-purpose bot for shouting out Twitch team members and subscribers in chat
Language(s): Python, Javascript
Tech, Lib(s): VSCode, TwitchIO, websockets (SocketIO)

During the stream we...

✔ decided on an audio library to use (pygame)
✔ built out a little classymajig to play the audio
✔ added a method to the class to play tts
✔ debated endlessly on how to play mp3s from api calls w/python
✔ forgot to hide chrome while coding (hawwwkkwarrrd 🙄)
✔ got some help from jigo ♥ tyyyyy
✔ tried using a diff library (cuz ofc)
✔ diff library was a bad choice 😬
✔ learned how eyebrows work 🤪
✔ struggled w/ pygame holding on to files after it plays it, blocking subsequent tts calls
✔ resolved the bug and discovered a "technique" called "double-buffering"
✔ GOT TTS TO PLAY! implemented the function into event logic 😎
✔ cleaned up the code a bit and made commits to dev
✔ fed some sheep b4 we raided al sweigart :3
✔ accidentally hit the raid button too soon... 😏

In the next stream...

We'll tie up any loose ends and make sure everything is documented and easy to deploy... then start planning our next project!

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up