Getting Streaming Audio, Connecting Your Soundboard, Recording Audio, And Chatbot In Jitsi Meet – All In Just A Browser Window
One of the biggest gaps when moving away from Discord — at least for me and my group — are some of the specific bots and services that can be used with our group calls.
I do NOT mean AI-powered chatbots. These are utility programs.
Specifically, there’s four things that we tend to use:
- A text chat bot for die rolling and simple reminders
- Audio streaming from an MP3 or OGG streaming station
- Using a local soundboard (the quite excellent Kenku-FM)
- Audio recording (we’ve been using Craig, which is currently Discord-specific)
With the exception of recording, there are not official ways to do this, and I was concerned that the processing demands of the official recording solution (Jibri) would exceed the hardware for the decade-old laptop I’m building all of this on.
I did find some scripts that had limited functionality, required adding a browser extension, or hadn’t gotten updates since before the pandemic, but found them not meeting the needs of this project in some fashion.
Using those as a base or inspiration, and with a non-trivial amount of help from an LLM (1), I developed and tested a solution for all of the above that works in your browser, without installing anything (2), and without being a huge change to your workflow (3).
ASIDE: A big caveat is that any of the audio functions effectively require you to use a self-hosted Jitsi Meet server due to the way that the public instance does shard load balancing. (4)
The quickstart? Go to the GitHub pages page for the project in a new tab https://uriel1998.github.io/jitsi-bot/. It will load all four bots into iFrames in that tab, where you can toggle them independently. Put your conference URL into the appropriate field, and click “Toggle Bot”. It’ll reload in that frame and connect; the field will change colors once it’s connected. You can also see a log if you scroll down inside the iFrame.
See also How To Backfill Text Channels From Discord To NextCloud Don’t like the iFrame? Then load the bot you want separately:
https://uriel1998.github.io/jitsi-bot/streaming/streaming.html
https://uriel1998.github.io/jitsi-bot/soundboard/soundboard.html
https://uriel1998.github.io/jitsi-bot/chatbot/chatbot.html
https://uriel1998.github.io/jitsi-bot/recording/recording.html
The chatbot has quite a few commands; try !command to start. It includes a die roller, card shuffler and drawer, text tarot card draw, and being able to respond with text files. You can put your own text in (if you run the bots locally) to meet your needs.
The soundboard bot will accept any audio through the virtual microphone, so if you’d rather play your local music player through there instead of the streaming version, go for it!
The recording bot will record audio tracks per-speaker and as a single combined whole. It will save the audio in chunks as .webm files every few minutes, so when prompted, tell your browser to save that filetype automatically.
For example, you can see the various “parts” here in this screenshot, as well as the script that will combine them all automatically.
That is both to allow the script to run in a smaller memory space and to protect against data loss if something crashes. There’s a merge_recordings script in the repository for Linux, Windows, and Macs to automatically stitch them together with ffmpeg and clean it all up.
You can see the rest of these guides for moving away from Discord to NextCloud and Jitsi Meet on previous posts on my blog.
https://www.youtube.com/watch?v=Z_Lgwfvai_w
Featured Image by Alexandra_Koch from Pixabay
See also How To Self-Host Jitsi Meet For Audio (or Video) Calls (1) Because I know this is contentious for some folx: I know enough to follow the structure, but I don’t know the specific syntax and commands to achieve specific goals. I also am not claiming any authorship or copyright on these scripts; any restrictions on their use is based off of the license of the code that was used for a base/inspiration. While functional, they are intended to be proof-of-concept. The idea is to maximize the public good against the use of the LLM to assist me in developing these.
(2) Okay, technically you need a virtual microphone for the soundboard bot and ffmpeg for merging recordings for the recording bot. Get a free virtual microphone without having to use OBS: Windows,Linux,Macs. Get ffmpeg : FFmpeg download page (Windows builds), FFmpeg download page (Linux packages), Homebrew ffmpeg formula
(3) I have touched base or put in issues with the dev team for both Craig and Kenku. Craig’s development team pointed me (ironically) to their Discord; I’ve not seen a response from Owlbear Studio. However, see #1 above; PLEASE use this proof of concept to do something better.
(4) If there’s a way around it without running a headless browser as a client, I cannot figure it out. If the Craig dev team, Owlbear, or any other coder want to focus on a value-add beyond these, PLEASE use this proof of concept to do something better.
See also Weekend Project: How To Replace Discord With Free Software And An Old PC
#1 #discord #jitsi #nextcloud #selfHosted