✨ NOW AVAILABLE AS FREE HOSTED BOT 🎉
This is the documentation for the re-written v2 version. Original v1 Version
A bot that automatically translate voice chat into a user selectable language in order to provide an easy way to communicate through voice chat for individuals speaking different languages natively. This project was originally started during the 2019 Discord Hack Week hackathon.
- Join a voice channel
- Make the bot join your channel by typing
!translation join
- Use
!translation start <from> <to>
to select source and destination language and start the translation for yourself - Just talk like normal
- When you're done end your session using
!translation stop
and make the bot leave using!translation leave
Other commands:
!translation status
tells you if you have translation mode enabled.
!translation languages
shows you all available languages.
!translation help
gives you an overview of all available commands.
If you for whatever reason don't want to use the free hosted version of this bot is the easiest way to host this bot yourself is using Docker.
-
Build the Dockerfile located in the root of the project
$ docker build -t discord-live-translator .
-
Download models and scorers for Coqui STT for all languages you want to support and put them in a models directory.
-
Set up an instance of LibreTranslate.
-
Start containers for Mozilla TTS for all languages you want to support
-
Start an instance of Redis.
-
Start the discord-live-translator container while providing two volumes: One for the config file and one for the STT models. In addition provide the bot token from the Discord Developer Portal as BOT_TOKEN as well as the URL for your Redis instance as REDIS_URL environment variables.
$ docker run -e BOT_TOKEN=xxxxx -v `pwd`/config.json:/app/config.json -v `pwd`/models:/app/models discord-live-translator
{
"translationHost": "http://translator:5000", // LibreTranslate host (use https://libretranslate.com if not self-hosting)
"languages": { // Contains all available languages
"en": { // Unique language key
"icon": ":flag_us:", // Fitting Icon/Emoji
"displayName": "English", // Language display name
"sttModel": "en/deepspeech-0.9.3-models.pbmm", // DeepSpeech Model file relative to model directory
"sttScorer": "en/deepspeech-0.9.3-models.scorer", // DeepSpeech Scorer file relative to model directory
"ttsHost": "http://tts:5002", // Address of Mozilla TTS Container
"translatorCode": "en", // Language code for LibreTranslate
"supports": "io" // Specify whether only input or output or both are supported
},
...
...
...
}
}