olidroide / lorita-bot

Lorita is like a parrot repeat as you say it but in this case reply in text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues Apache License LinkedIn


Logo
Parrot icons created by Freepik - Flaticon

Lorita Bot

Lorita helps you to transcript audio messages of your chat app.
Explore the docs »

View Demo · Report Bug · Request Feature

📝 Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

💡 About The Project

Product Name Screen Shot

How many times you're in a meeting and receives and Audio Message? you can't take your phone and listen it, needs to finish the meeting and then listen.

Lorita-Bot transcribe that Audio Message to text, and you cand read it without listen it.

(back to top)

⛏️ Built With

(back to top)

🏁 Getting Started

This is an example of how you may give instructions on setting up your project locally or in a Server.

Prerequisites

Depends of how do you want deploy it:

  • Local (with Python):

    • Install Python 3.9, pip and virtualenv on your OS.
  • Docker:

    • Install Docker on your OS (also I recommend install docker-compose)

⚡ Installation

  • Get a free API Key at deepgram.com

  • Get a free API Key at twilio.com

  • Clone the repo

    git clone https://github.com/olidroide/lorita-bot.git
  • Create environment file .env

    LORITA_BOT_DEBUG=True
    LORITA_BOT_BASEURL=/
    LORITA_BOT_LOG_LEVEL=DEBUG
    LORITA_BOT_TWILIO_ACCOUNT_SID=[Twilio Account SID]
    LORITA_BOT_TWILIO_AUTH_TOKEN=[Twilio Auth Token]
    LORITA_BOT_DG_KEY=[Deepgram API KEY]
    LORITA_BOT_BACKEND_TELEGRAM_API_KEY=[Telegram API key obtained by BotFather]
    LORITA_BOT_BACKEND_DOMAIN_NAME=[your domain name example: lorita-bot.olidroide.es]
  • Deploy backend with Python 🐍

    • Make virtualenv

      virtualenv venv --python=python3
    • Install dependencies

      pip install -r requirements.txt
    • Launch server sh python src/backend/main.py

  • Deploy frontend with Node 📦

    • Go to source folder of frontend

      cd frontend
    • Launch

      npm run dev

  • Deploy with Docker 🐳

    • Build docker image with docker-compose. Create this file docker-compose.yml
      version: '2.3'
    
      services:
        traefik:
          image: traefik:2.6.1
          container_name: traefik
          restart: always
          ports:
            - 80:80
            - 443:443
          networks:
            - world
            - internal-lan
          extra_hosts:
            - host.docker.internal:host-gateway
          dns:
            - 1.1.1.1
            - 8.8.8.8
          security_opt:
            - no-new-privileges:true
          volumes:
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock:ro
    
        lorita-bot:
          image: ghcr.io/olidroide/lorita-bot:backend-latest
          container_name: lorita-bot
          restart: unless-stopped
          depends_on:
            - traefik
          networks:
            - internal-lan
            - world
          ports:
            - 8000:8000
          environment:
            - LORITA_BOT_BACKEND_PORT=8000
            - LORITA_BOT_BACKEND_DEBUG=True
            - LORITA_BOT_BACKEND_BASEURL=/api/v1
            - LORITA_BOT_BACKEND_LOG_LEVEL=DEBUG
            - LORITA_BOT_BACKEND_DOMAIN_NAME=lorita-bot.olidroide.es
            - LORITA_BOT_BACKEND_DG_KEY=********
            - LORITA_BOT_BACKEND_TELEGRAM_API_KEY=******:******
          labels:
            - traefik.enable=true
            - traefik.docker.network=internal-lan
            # HTTP
            - traefik.http.routers.lorita-bot.rule=Host(`lorita-bot.olidroide.es`) && PathPrefix(`/api/v1`)
            - traefik.http.services.lorita-bot.loadbalancer.server.port=8000
            - traefik.http.routers.lorita-bot.entrypoints=web
            # REDIRECT
            - traefik.http.routers.lorita-bot.middlewares=lorita-bot-https-redirect
            - traefik.http.middlewares.lorita-bot-https-redirect.redirectscheme.scheme=https
            # HTTPS
            - traefik.http.routers.lorita-bot-secure.rule=Host(`lorita-bot.olidroide.es`) && PathPrefix(`/api/v1`)
            - traefik.http.routers.lorita-bot-secure.entrypoints=websecure
            - traefik.http.routers.lorita-bot-secure.tls.certresolver=letsencrypt
    
        lorita-bot-frontend:
          image: ghcr.io/olidroide/lorita-bot:frontend-latest
          container_name: lorita-bot-frontend
          restart: unless-stopped
          depends_on:
            - traefik
          networks:
            - internal-lan
          ports:
            - 3000:3000
          environment:
            - LORITA_BOT_BACKEND_PORT=8000
          labels:
            - traefik.enable=true
            - traefik.docker.network=internal-lan
            # HTTP
            - traefik.http.routers.lorita-bot-frontend.rule=Host(`lorita-bot.olidroide.es`)
            - traefik.http.services.lorita-bot-frontend.loadbalancer.server.port=3000
            - traefik.http.routers.lorita-bot-frontend.entrypoints=web
            # REDIRECT
            - traefik.http.routers.lorita-bot-frontend.middlewares=lorita-bot-https-redirect
            # HTTPS
            - traefik.http.routers.lorita-bot-frontend-secure.rule=Host(`lorita-bot.olidroide.es`)
            - traefik.http.routers.lorita-bot-frontend-secure.entrypoints=websecure
            - traefik.http.routers.lorita-bot-frontend-secure.tls.certresolver=letsencrypt
    
      networks:
        world:
          name: world
          external: true
        internal-lan:
          name: internal-lan
          external: false
          internal: true
    docker-compose up -d
    • Or use pre build image from
      docker pull ghcr.io/olidroide/lorita-bot:backend-latest
      docker pull ghcr.io/olidroide/lorita-bot:frontend-latest

(back to top)

Usage

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.

For more examples, please refer to the Documentation

(back to top)

Roadmap

  • Dockerized image
  • Multilanguage detection
  • More Chat app integrations
    • Telegram

See the open issues for a full list of proposed features (and known issues).

(back to top)

🤝 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

✍️ License

Distributed under the Apache License. See LICENSE for more information.

Lorita-bot logo parrot designs were created by Freepik - Flaticon Freepik - Flaticon

(back to top)

📫 Contact

olidroide - @olidroide - lorita@olidroide.es

Project Link: https://github.com/olidroide/lorita-bot

(back to top)

About

Lorita is like a parrot repeat as you say it but in this case reply in text

License:Apache License 2.0


Languages

Language:Python 61.8%Language:JavaScript 21.0%Language:CSS 7.5%Language:Dockerfile 5.3%Language:HCL 2.9%Language:Makefile 1.5%