Simple telegram translator bot that uses easyocr, pillow and google translate package to translate messages and photos that have text to desired output language
docker
docker-compose
- 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/
- Build docker image
docker build -t telegram-translator-bot .
- From root directory start docker container
docker-compose up -d
- Live example
- Error handling
- Language detection
- Handle multiple photos sent at once
- Solve known issues
- Crop demo gif
- Text from images is translated poorly if the font is not common or spaces between words are too small