Skip to content

yoyu777/discord-voice-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Voice Bot Demo

This is a demo of the voice feature of Discord API, via Discord.js SDK.

  • The Broadcast bot can play an audio file in a voice channel
  • The Transcriber bot can listen to a user and transcribe what they say

How to run the bot

  1. Prerequisites:
  • Install ffmpeg: http://ffmpeg.org/
  • Create a Google Cloud project, enable the Speech API
  • Have a service account ready, create and download the JSON credentials
  1. Install node.js dependencies
npm install
  1. Create a .env file in the root directory
GOOGLE_APPLICATION_CREDENTIALS=[path to the JSON credentials]
DISCORD_BOT_TOKEN_BROADCASTER=[your Discord bot token]
DISCORD_BOT_TOKEN_TRANSCRIBER=[your Discord bot token]
  1. Run the bot
npm start

Interact with the bot

  • play: to play the audio file
  • stop: to stop playing the audio file
  • listen: listen to the speech and transcribe

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published