Giter Site home page Giter Site logo

dromzeh / vmt Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 1.0 18 KB

✨ Discord Bot that transcribes (& translates) Discord's voice messages into text.

License: MIT License

Python 97.20% Dockerfile 2.80%
deepl discord discord-voice speech-recognition translator voice-recognition discord-py

vmt's Introduction

VMT - Discord Voice Message Transcriber and Translator

License: MIT Formatter: Black

A Discord bot that can transcribe and translate Discord Voice Messages.

  • Uses the DeepL API for translation and Google's Speech Recognition API for transcription.

Requirements

  • Python 3.8+
  • discord.py
  • pydub
  • speech recognition
  • deepl

Run the following:

pip install -r requirements.txt

Installation

Note Bot requires Intents to be enabled in the developer portal & an API key for the DeepL API.

  • Clone the repository: git clone https://github.com/dromzeh/vmt.git
  • Rename the config.example.json file to config.json inside src/config and fill in the necessary values (See Configuration)

Once the configuration file has been filled, you may run the bot using one of the following methods:

Native Installation

  • Install the requirements pip install -r requirements.txt
  • Run the bot inside the /src folder: python main.py

Docker Installation (Easier)

Assuming docker and docker-compose are installed

docker-compose -f compose.yaml up

Usage

  • To use the bot, simply reply to a voice message with the transcribe command. The bot will transcribe the voice message and post the transcription as a reply, if you don't reply, the bot will find the most recent voice message in the channel and transcribe it instead.
  • If you want to automatically translate the text, you can just add the language code as an argument, such as : vmt transcribe es for Spanish, full list is available at vmt languages or here.
  • The bot will then automatically translate the text using the DeepL API.

Configuration

The config.json file contains the following fields:

  • discord_token: Your Discord bot token.
  • deepl_api_key: Your DeepL API key.
  • language_codes: A dictionary of language codes and their corresponding language names.

Language Code List

Click to expand
    "language_codes": {
        "BG": "Bulgarian",
        "CS": "Czech",
        "DA": "Danish",
        "DE": "German",
        "EL": "Greek",
        "EN-GB": "English (British)",
        "EN-US": "English (American)",
        "ES": "Spanish",
        "ET": "Estonian",
        "FI": "Finnish",
        "FR": "French",
        "HU": "Hungarian",
        "ID": "Indonesian",
        "IT": "Italian",
        "JA": "Japanese",
        "KO": "Korean",
        "LT": "Lithuanian",
        "LV": "Latvian",
        "NB": "Norwegian (Bokmål)",
        "NL": "Dutch",
        "PL": "Polish",
        "PT-BR": "Portuguese (Brazilian)",
        "PT-PT": "Portuguese",
        "RO": "Romanian",
        "RU": "Russian",
        "SK": "Slovak",
        "SL": "Slovenian",
        "SV": "Swedish",
        "TR": "Turkish",
        "UK": "Ukrainian",
        "ZH": "Chinese (simplified)"
    }

License

This project is licensed under the MIT License - see the LICENSE file for details.

vmt's People

Contributors

dromzeh avatar strazto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

strazto

vmt's Issues

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.