Giter Site home page Giter Site logo

sunanle / discord-live-translator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wotschofsky/discord-live-translator

0.0 0.0 0.0 578 KB

Voice Translation Bot for Discord

Home Page: https://discord-live-translator.felisk.io

License: GNU General Public License v3.0

JavaScript 0.66% TypeScript 97.41% Dockerfile 1.92%

discord-live-translator's Introduction

โœจ NOW AVAILABLE AS FREE HOSTED BOT ๐ŸŽ‰

Discord Live Translation 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.

How to use

  1. Join a voice channel
  2. Make the bot join your channel by typing !translation join
  3. Use !translation start <from> <to> to select source and destination language and start the translation for yourself
  4. Just talk like normal
  5. 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.

Setup using Docker

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.

  1. Build the Dockerfile located in the root of the project

    $ docker build -t discord-live-translator .

  2. Download models and scorers for Coqui STT for all languages you want to support and put them in a models directory.

  3. Set up an instance of LibreTranslate.

  4. Start containers for Mozilla TTS for all languages you want to support

  5. Start an instance of Redis.

  6. 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

Example config.json

{
  "commandPrefix": "!", // Prefix of choice
  "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
    },
    ...
    ...
    ...
  }
}

discord-live-translator's People

Contributors

dependabot[bot] avatar wotschofsky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.