Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

krystlepalace/Akaii-Chat-Bot

Repository files navigation

FireBot

A simple yet moderator-bot for Telegram chats with speech recognition, can translate voice messages to text.

Contents

  1. Install
  1. Todo

Install

Prequisites:

  1. Python 3.11 or higher
  2. Linux (if you want to run bot with systemd and have ffmpeg in your PATH)
  3. Systemd (to run bot as service);
  4. Docker (to build your own image with better vosk model or to run bot with docker compose).
  5. Any vosk model you want (and you can get it here https://alphacephei.com/vosk/models)
  6. Model for NudeNet (https://github.com/notAI-tech/NudeNet/releases/download/v0/classifier_model.onnx)

Basic startup

  1. git clone https://github.com/krystlepalace/Akaii-Telegram-bot
  2. cd Akaii-Tekegram-bot && python -m venv .venv
  3. source .venv/bin/activate (or .venv/Scripts/activate on windows)
  4. pip install -r requirements.txt
  5. replace '.env.example' with just '.env' and fill all the variables.
  6. put your vosk model folder in utils/neuro/vosk/ and rename model folder as 'model'
  7. put nudenet model in $HOME/.Nudenet/
  8. python main.py

Systemd

  1. Make sure to complete steps 1-6 from basic startup
  2. Replace 'akaii-bot.service.example' with just 'akaii-bot.service' and fill the WorkingDirectory and ExecStart variables
  3. Copy 'akaii-bot.service' to '/etc/systemd/system/'
  4. sudo systemctl enable akaii-bot.service and sudo systemctl start akaii-bot.service
  5. Now service should work, you can check it by systemctl status akaii-bot.service

Docker + Docker Compose

  1. Replace 'docker-compose.example.yml' with just 'docker-compose.yml'
  2. Edit '.env':
    • model path in docker container is '/app/utils/neuro/vosk/model'
    • media path is 'app/media/'
    • redis is just 'redis'
    • 'bot_token' is your bot's token
  3. Run 'docker compose up -d'
  4. Check container with docker compose ps
  • Also you may want to use stronger vosk models to get better speech recognition, so you will need to build new docker image.
  • To do this just download any vosk model you want and replace old model with it.
  • Before 'docker build' edit .env and fill variables like this:
MODEL_FULL_PATH='/app/utils/neuro/vosk/model'
MEDIA_FULL_PATH='/app/media/'
  • Then simply run docker build -t akaii-bot:1.0 .
  • And that's it, after build you can run bot in the container with command docker run akaii-bot

TODO

  • Localization using i18n (for en, ru and ukrainian)

AltStyle によって変換されたページ (->オリジナル) /