This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I am trying to make a bot that is able to "transcript" audio from conversations and return them to a text channel for a server I am in. so everyone is consenting to it, I dont want to hear how this "could" be illegal
I currently have two problems, one I want to make an event listener that triggers when someone talks, similair to how the discord.js guide has it in indiviual files. But I can't seem to find the event to do this; I have it so I can call an event in my slash command to join the voice channel (I only want to do this for neatness so it doesn't really matter)
voiceConn.receiver.speaking.on('start', async (userId) => {
const user = interaction.guild.members.cache.get(userId);
talkingUser = user.displayName
console.log(talkingUser, 'started')
})
Second, the more important part. How do I get audio data from discord itself? is it still possible, I know craig bot is able to do something in this manner, but I saw mulitple post from 2 years ago saying discord no longer supports this, but if craig bot can how are they? I was looking though the code for that bot and I can not seem to find anything that allows this (I might just be dumb)... Currently from what I have found,
const audioStream = voiceConn.receiver.AudioReceiveStream(user, { mode: 'pcm' });
should be the closest implenation to it, but I get an error saying its not a funcution. Any leads in the right directions would be extremely helpful thank you!!
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Discord_Bot...