Skip to content

dromzeh/vmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published