A simple server that sends PCM audio data to a Discord voice channel.
Expected audio format is 16-bit signed PCM, 48kHz, stereo.
Create .env file:
DISCORD_TOKEN=
DISCORD_GUILD_ID=
DISCORD_CHANNEL_ID=Install dependencies:
docker-compose run --rm worker yarnRun the bot:
docker-compose upThen send your audio to the TCP server at 127.0.0.1:28282. It is expected that the audio data will arrive in real-time.
There is also an API endpoint at http://127.0.0.1:28280/count that returns the number of listeners. The count is the number of people in the channel, while listening is the number of people whose Deafen is off.
Also, when non-bot chat messages are sent to the voice channel’s text chat, the latest 100 messages detected since startup can be retrieved from http://127.0.0.1:28280/chat. It currently does not provide an endpoint to post to the channel, as that can be done via webhooks instead.