https://github.com/vagr9k/voicebot
https://github.com/vagr9k/voicebot
discord discord-bot discord-js hotword-detection multithreading n-api nodejs speech-recognition speech-to-text typescript
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vagr9k/voicebot
- Owner: Vagr9K
- License: agpl-3.0
- Created: 2019-03-02T20:01:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-22T16:41:56.000Z (about 4 years ago)
- Last Synced: 2025-11-09T05:03:26.846Z (8 months ago)
- Topics: discord, discord-bot, discord-js, hotword-detection, multithreading, n-api, nodejs, speech-recognition, speech-to-text, typescript
- Language: TypeScript
- Size: 319 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VoiceBot
VoiceBot is a discord bot that support voice commands.
Invite the bot to your channel and then pronounce `{keyword} play {song name}` to play your favorite song!
## Demo
[](https://www.youtube.com/watch?v=vRwp--RoJdo)
Why `Terminator`? It seems to be the most consistently detected hotword.
Why `Mozart`? It's not copyrighted.
## How does this work
Consult [my blog post](https://vagr9k.me/using-n-api-for-high-performance-voice-command-detection-in-discord) about the design decisions if you're interested.
## How to use
NOTE: This project is in an alpha stage an relies on a native N-API module [native-voice-command-detector](https://github.com/Vagr9K/native-voice-command-detector) for high performance, multithreaded hotword detection and speech recognition. Consult [its documentation](https://github.com/Vagr9K/native-voice-command-detector#building) on how to build it.
To use the bot:
- Setup a `.env` configuration file:
```
DISCORD_BOT_TOKEN=YOUR_BOT_TOKEN
DISCORD_BOT_PREFIX='terminator ' # Or any other prefix used for text commands
YOUTUBE_API_KEY=YOUR_YOUTUBE_API_KEY # For searching songs
GCLOUD_SPEECH_TO_TEXT_API_KEY=YOUR_CLOUD_KEY # For native-voice-command-detector
PV_KEYWORD_PATH= # For native-voice-command-detector
PV_MODEL_PATH= # For native-voice-command-detector
PV_SENSITIVITY=0.5 # For native-voice-command-detector
MAX_VOICE_BUFFER_TTL=200 # For native-voice-command-detector
MAX_COMMAND_LENGTH=3000 # For native-voice-command-detector
MAX_COMMAND_SILENCE_LENGTH=1000 # For native-voice-command-detector
```
Consult [native-voice-command-detector](https://github.com/Vagr9K/native-voice-command-detector) documentation for the explanation of the last parameters.
- Install the dependencies via `yarn`
- Launch the bot via `yarn start`
## Copyright
Copyright (c) 2019 Ruben Harutyunyan