1
0
Fork
You've already forked dvac
0
discord voice activity capture
  • Rust 85.2%
  • JavaScript 7.3%
  • CSS 6%
  • HTML 1.5%
2023年10月03日 21:08:34 -07:00
page add configurable delay to display 2023年06月17日 15:31:42 -07:00
src add ws domain variable 2023年10月03日 21:08:34 -07:00
.gitignore initial discord bot and voice handler 2023年06月15日 18:38:45 -07:00
Cargo.lock fix web 2023年06月16日 13:00:05 -07:00
Cargo.toml fix web 2023年06月16日 13:00:05 -07:00
LICENSE license and readme 2023年06月16日 13:53:14 -07:00
README.md add ws domain variable 2023年10月03日 21:08:34 -07:00

dvac (discord voice activity capture)

This is a discord voice activity capture bot that can display that information to a webpage that it hosts. This page can be used as an OBS browser source to display a discord voice call's activity on your stream.

how to

first, create a discord bot account and get the token (out of scope of this guide).

second, set environment variables. These ones are necessary for the bot to function:

  • DVAC_TOKEN: the discord bot's token
  • DVAC_ROLE: the role that allows users to control the bot

These variables are not necessary, but allow you to further configure the bot:

  • DVAC_PREFIX: the prefix for the bot's commands. Default is ";"
  • DVAC_WEBPAGE_ADDR: the address the bot should host the display webpage on. Default is localhost (127.0.0.1).
  • DVAC_WEBPAGE_PORT: the port the bot should host the display webpage on. Default is 8080
  • DVAC_WS_ADDR: the address the bot should host the websocket server (used for sending information to the webpage) on. Default is localhost
  • DVAC_WS_PORT: the port the bot should host the websocket server on. Default is 8192
  • DVAC_WS_DOMAIN: if you have the webpage for example behind a reverse proxy, the bot needs to know where this is so that it can call back for the websocket connection.

now you can run the bot (cargo run --release). it needs to be run in the same directory as the page subdirectory to work.

now, point your browser source at the address of the webpage (localhost:8080/index.html by default). nothing should display yet.

join a voice channel, ensure you have the role that you configured earlier, and run the capture command (default ;capture). the bot should join your voice channel and mute itself. Once you start speaking / activate your push-to-talk, you should appear on the webpage.

use the 'stopcapture' command to disconnect the bot from the voice channel

it is safe to drag the bot between voice channels and to refresh the browser source.

to display the users horizontally, expanding from the center of the window instead of vertically expanding downwards from the top left, point the browser source at index-horiz.html instead.

if you need to delay the display of circles, for example to synchronize with a video source, you can use the command ;setdelay x where x is a number of seconds, with optional decimal places.

limitations

  • users will not appear on the webpage until they speak at least once, or if they mute and unmute
  • you cannot have two websocket clients (e.g. browser sources) active at the same time
  • depending on how fast they load, there might be some weirdness as the profile pictures load in