Telegram bot for auto transcription of voice messages.
Try it in Telegram
.
├── app
│ ├── .env # secret token
│ ├── main_telega.py # runs telegram bot
│ └── speech.py # texts audio function
├── .gitignore
├── Dockerfile
├── README.md
└── requirements.txt
To install the dependencies run:
$ pip install -r requirements.txt
- Create demone file
$ sudo nano /etc/systemd/system/bot.service
Input in the file next script
[Unit]
Description=My bot
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/python /usr/src/bot.py
Restart=always
[Install]
WantedBy=multi-user.target
- Run the next commands
$ sudo systemctl daemon-reload
$ sudo systemctl enable bot.service
$ sudo systemctl start bot.service
- Helpful commands
Stop bot
$ sudo systemctl stop bot.service
Delete from autorun
$ sudo systemctl disable bot.service
Check demone working
$ sudo systemctl status bot.service
- Build Docker image:
docker build -t name:image -f Dockerfile .
- Run Docker in interactive mode:
docker run -it name:image
- Run in demone:
docker run -d name:image