Giter Club home page Giter Club logo

akaii-chat-bot's Introduction

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)

akaii-chat-bot's People

Contributors

krystlepalace avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.