A powerful Telegram Bot for translating text, voice, and images using NLLB-200 with dl-translate!
- Translate text messages seamlessly into multiple languages.
- Powered by NLLB-200, ensuring high-quality and more accurate translations.
- Supports speech-to-text and translation for audio messages.
- Utilizes Speech Recognition for extracting text from voice.
- Extract and translate text from images.
- Leverages Tesseract OCR for reliable text detection.
Library | Purpose |
---|---|
NLLB-200 | High-quality language translation |
dl-translate | Lightweight translation toolkit |
SpeechRecognition | Convert voice to text |
Tesseract OCR | Extract text from images |
PyTelegramBotAPI | Telegram bot functionality |
- Python 3.9+
- Telegram Bot Token
- Disk space upt o 5 GB+ and ram 2 GB+ (for NLLB running)
- Dependencies installed via
requirements.txt
-
Clone the repository:
git clone https://github.com/yourusername/nekozu-translator-bot.git cd nekozu-translator-bot
-
Install dependencies:
sudo apt install tesseract-ocr ffmpeg pip install -r requirements.txt
-
Make your
.env
file with your Telegram bot token:BOT_TOKEN=your-telegram-bot-token
-
Run the bot:
python main.py
-
Text Translation: Send a text message, and the bot will reply with the translated text in your chosen language.
-
Voice Translation: Send a voice message, and the bot will transcribe and translate it.
-
Image Translation: Send an image, and the bot will extract and translate the text it contains.
With the power of NLLB-200, the bot supports 200+ languages!
We welcome contributions to make this project even better! Here's how you can help:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
. - Commit your changes:
git commit -m 'Add a new feature'
. - Push to the branch:
git push origin feature-name
. - Submit a pull request.
This project is licensed under the MIT License.
Don't forget to give a star!