Skip to content

Music discord.py bot with build-in google assistant and other usefull features (can be used with voice or text commands).

Notifications You must be signed in to change notification settings

fabioo29/voice-assistant-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voice assistant discord bot

Music discord bot with built-in google assistant


Bot default prefixes: ['-', '!', 'google '] - The bot will recognize your voice if it starts with those prefixes or any chat command in the same way. You can see what the bot is catching in your console with the '-sp' argument. Check Input arguments below for more info.


-help command (known existing google commands + some usefull ones)

Voice commands
  tell me a joke
  temperature braga {in centigrades}
  rain today lisbon
  what's python language?
  time in japan
  day in 29/04/1998
  423*12+23-1
  spin the wheel
  cristiano ronaldo {born,married, age, play for}
  who wrote rich dad poor dad
  10cm to inch
  real madrid win
  surprise me

Chat commands (+ voice commands)\n
  -translate hello {en, english} {pt, portuguese}
  -convert 100 USD EUR
  -quote AAPL
  -play {youtube url/search terms}
  -{pause, unpause, skip, queue}

Input arguments (optional features)

python discord-bot/main.py --help
usage: main.py [-h] [-sp] [-cd] [-rt RESPONSETIME]

optional arguments:
  -h, --help            show this help message and exit
  -sp, --speechdetection
                        show speech detection print in console
  -cd, --channeldialog  hide dialog User/BOT in channel chat
  -rt RESPONSETIME, --responsetime RESPONSETIME
                        time for user to ask something to BOT in voice channel

SETUP: You need to change the .env file according to your data:

# .env file you need to change
# check .env.example for instructions

DEVICE_ID = "something-something"

DEVICE_MODEL_ID = "<DEVICE_ID>-something-something"

CREDENTIALS = '{'key1': 'value1', 'key2': 'value2'}'

ASSISTANT_TOKEN = "Token from credentials.json"

DISCORD_TOKEN = "discord Token"
virtualenv venv -p python3.9    # create virtualenv
source venv/bin/activate

# install dependencies
pip install -r requirements     
sudo apt update; sudo apt-install ffmpeg

python discord-bot/main.py      # start discord app

To add: : (1) Top.gg integrationn


Tested in Ubuntu 18.04, Python3.9

Deployed with Replit.com and Github Actions

About

Music discord.py bot with build-in google assistant and other usefull features (can be used with voice or text commands).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published