Skip to content

Latest commit

 

History

History
130 lines (90 loc) · 7.47 KB

File metadata and controls

130 lines (90 loc) · 7.47 KB

vmt

Transcribe and translate Discord voice messages.

Discord members Deployed on Railway Made with love License: GPL-3.0

vmt is a Discord app that transcribes voice messages and optionally translates them into 30+ languages via DeepL. It works in servers, group chats, and DMs, and can be installed to a server or to your own account.

Note

If you don't want to deploy or self-host, we run a free hosted instance that supports voice messages up to 3 minutes.

Add to Discord →

Usage

  1. Right-click a voice message (long-press on mobile)
  2. Select Apps → Select Voice Message
  3. Run /transcribe, optionally passing a language to translate into

Commands

Command Description
/transcribe [translate_to] [public] Transcribe the selected voice message, optionally translating it into another language
/languages [public] Browse all supported translation languages and their codes
/help [public] Show usage instructions and the command reference

Responses are only visible to you by default; set public: true to post them to the channel.

How it works

Voice messages are decoded with pydub (via FFmpeg) and transcribed with ElevenLabs Scribe when an API key is configured, falling back to Google Speech Recognition through SpeechRecognition otherwise. Translations use the DeepL API.

Every clip is checksummed and cached in a libsql database (a local file by default, or Turso remotely), so the same voice message is never transcribed twice — and cache hits never count against usage quotas. Optional per-user daily quotas (in seconds of audio) keep public instances abuse-proof.

Repository layout

Path Description
apps/bot The Discord bot — Python, managed with uv
apps/web vmt.sh — Astro + React site

Self-hosting

1. Create a Discord application

  1. Go to the Discord Developer Portal and create a new application
  2. Under Installation → Installation Contexts, enable both User Install and Guild Install
  3. Under Installation → Default Install Settings, add the applications.commands scope to both install contexts
  4. Under Bot → Privileged Gateway Intents, enable Message Content Intent (required to read voice message attachments)
  5. Copy your bot token from the Bot page — you'll need it for the environment variables
  6. Copy the install link from the Installation page to add the app to your account or server

2. Configure environment variables

Variable Description
BOT_TOKEN Your Discord bot token from the Developer Portal
DEEPL_API_KEY Your DeepL API key
DEEPL_FREE_API Set to true if using DeepL's free tier (it uses a separate endpoint, api-free.deepl.com); defaults to false
ELEVENLABS_API_KEY Optional. ElevenLabs key for Scribe transcription; unset falls back to free Google Speech Recognition
TURSO_DATABASE_URL Optional. Remote Turso database URL; unset uses a local file at data/vmt.db
TURSO_AUTH_TOKEN Optional. Auth token for the Turso database
DAILY_LIMIT_SECONDS Optional. Per-user daily audio quota in seconds; unset means unlimited
MAX_VOICE_MESSAGE_DURATION Maximum voice message duration in seconds (default: 60)

3. Deploy

Docker (recommended)

git clone https://github.com/antifield/vmt.git
cd vmt

# copy env, fill in credentials
cp apps/bot/.env.example apps/bot/.env

docker compose up -d

The compose file persists the local database to ./data.

Railway

Deploy on Railway

This repository deploys to Railway in one click, with a volume mounted at /app/data so the local database survives redeploys. Signing up through our link also grants you $20 in Railway credits.

If you deploy to Railway manually instead of via the template, attach a volume at /app/data and set RAILWAY_RUN_UID=0 (Railway mounts volumes as root, and the container runs as a non-root user). Setting TURSO_DATABASE_URL skips the need for a volume entirely.

Run locally

You'll need Python 3.13+, uv, and FFmpeg:

  • macOS: brew install ffmpeg
  • Ubuntu/Debian: sudo apt-get install ffmpeg
  • Windows: download from ffmpeg.org, or choco install ffmpeg via Chocolatey
git clone https://github.com/antifield/vmt.git
cd vmt/apps/bot

# copy env, fill in credentials
cp .env.example .env

uv run python -m vmt

Website

The vmt.sh site lives in apps/web (Astro + React + Tailwind):

cd apps/web
bun install
bun run dev

License

antifield/vmt is licensed under the GNU General Public License v3.0. Authored by @dromzeh <marcel@antifield.com>.

You must state all significant changes made to the original software, make the source code available to the public with credit to the original author, original source, and use the same license.

© 2023–2026 Antifield LTD | Registered UK Company No. 15988228 | ICO Reference No. ZB857511