Skip to content

Telegram translator bot that uses easyocr, pillow and google translate package to translate messages and photos that have text to desired output language.

Notifications You must be signed in to change notification settings

Faustasm/telegram-translator-bot

Repository files navigation

telegram-translator-bot

Simple telegram translator bot that uses easyocr, pillow and google translate package to translate messages and photos that have text to desired output language

Demo

PRODUCT DEMO/GIF

Requirements

docker
docker-compose

Full usage example

  1. Set bot token, input language and output language in settings.py
BOT_TOKEN = "<your_bot_token>"
INPUT_LANGUAGE = "<input_language_code>"
OUTPUT_LANGUAGE = "<output_language_code>"

All supported languages can be seen here https://www.jaided.ai/easyocr/

  1. Build docker image
docker build -t telegram-translator-bot .
  1. From root directory start docker container
docker-compose up -d

To do

  • Live example
  • Error handling
  • Language detection
  • Handle multiple photos sent at once
  • Solve known issues
  • Crop demo gif

Known Issues

  • Text from images is translated poorly if the font is not common or spaces between words are too small

About

Telegram translator bot that uses easyocr, pillow and google translate package to translate messages and photos that have text to desired output language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published