Skip to content

dtinth/pcm2discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pcm2discord

A simple server that sends PCM audio data to a Discord voice channel.

Expected audio format is 16-bit signed PCM, 48kHz, stereo.

Usage

Create .env file:

DISCORD_TOKEN=
DISCORD_GUILD_ID=
DISCORD_CHANNEL_ID=

Install dependencies:

docker-compose run --rm worker yarn

Run the bot:

docker-compose up

Then 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published