A simple multilingual Telegram bot that helps you expand your vocabulary, learn new phrases, and improve pronunciation.
The bot supports any combination of native and learning languages.
Just send a word or sentence to the Telegram chat where your bot is added — it will automatically translate it and send back an audio message with the pronunciation.
The audio message includes:
<the phrase in studying language>,
<the phrase in your native language>,
<the slow phrase in studying language>
Audio example for English (studying language) and French (native language), generated by the bot:
If you send a single word and the translation module provides definitions or examples, those will also be included in the audio file.
git clone https://github.com/vensder/language-tutor-bot.git
cd language-tutor-botpython3 -m venv venv
source ./venv/bin/activate
pip install -r requirements.txtCopy the example .env file and replace the placeholder token with your real Telegram Bot API token:
mv .env.example .envOr you can export it manually in your terminal:
export TELEGRAM_TOKEN=123456789:ABCDEFGHIJKLMNOabcdefghijklmnopqrstIf you don’t have a Telegram bot yet, create one using BotFather and get your token:
Create your bot with BotFather: https://core.telegram.org/bots/features#botfather
Authorize your bot: https://core.telegram.org/bots/api#authorizing-your-bot
Edit the configuration file and set your native language and learning language codes. You can find all available language codes here: 👉 https://cloud.google.com/translate/docs/languages
./main.pyThe bot saves audio files directly in your Telegram group or channel, so you can:
- Listen to them anytime on your phone (even while walking)
- Play them in sequence using the Telegram media player
- Delete the ones you’ve already memorized and add new ones easily
You can easily build and run the bot using Docker Compose.
Create a .env file in the project root (you can copy from .env.example) and update it with your real Telegram bot token and language codes:
cp .env.example .envExample .env:
TELEGRAM_TOKEN=123456789:ABCDEFGHIJKLMNOabcdefghijklmnopqrst
LOGGING_LEVEL=INFO
LEARNING_LANGUAGE=en
NATIVE_LANGUAGE=frdocker compose buildRun the bot in the background:
docker compose up -dTo check the logs:
docker compose logs -fWhen you’re done, stop and remove the container:
docker compose downThis setup keeps your environment clean and allows you to run the bot anywhere with a single command.


