https://github.com/zensimilia/slow-tunes-bot
Slowing down audio tracks at 33/45 rpm vinyl ratio for aesthetic pleasure
https://github.com/zensimilia/slow-tunes-bot
audio bot docker music python sox telegram telegram-bot
Last synced: 3 months ago
JSON representation
Slowing down audio tracks at 33/45 rpm vinyl ratio for aesthetic pleasure
- Host: GitHub
- URL: https://github.com/zensimilia/slow-tunes-bot
- Owner: zensimilia
- License: mit
- Created: 2022-05-30T13:09:55.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-18T12:42:44.000Z (12 months ago)
- Last Synced: 2024-08-03T01:16:32.996Z (12 months ago)
- Topics: audio, bot, docker, music, python, sox, telegram, telegram-bot
- Language: Python
- Homepage: https://t.me/slowtunesbot
- Size: 102 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slow-tunes-bot
This bot slows down an user's audio from 45 to 33 rpm (vinyl) ratio.
Protected from throttling. Queue implemented. Supports webhook
and polling modes.## How to use
### Docker: the easiest way
```bash
touch .env
docker compose up -d --build
```### Install: old method
```bash
python -m venv env
source env/scripts/activate
pip install -r requirements
touch .env
python main.py
```## Configure
Set the necessary environment variables from table below or fill they in `.env` file. Available environment variables to configure the Bot:
| Variable | Type | Description | Required |
| --------------- | ------- | --------------------------------------------------------------------- | -------- |
| `ADMIN_ID` | integer | Telegram _user_id_ of moderator/administrator. | \* |
| `ALBUM_ART` | string | Relative path to album art (cover) JPEG image file. | |
| `APP_HOST` | string | Host that bot will listen on. | |
| `APP_PORT` | integer | Port that bot will listen on. | |
| `BOT_TOKEN` | string | Telegram API Bot token. | \* |
| `DATA_DIR` | string | Relative path to the directory where the Bot will store a data. | |
| `DB_FILE` | string | SQLite database filename. | |
| `DEBUG` | boolean | If true change logging level to _debug_. | |
| `SPEED_RATIO` | float | What slowing ratio to use. 1 - original speed, 0.5 - half speed, etc. | |
| `REDIS_HOST` | string | Host or IP-address of Redis server. | |
| `REDIS_PORT` | integer | Port of Redis server. | |
| `TASK_LIMIT` | integer | Queue limit for single user tasks. | |
| `THROTTLE_RATE` | integer | Throttling rate in seconds. | |
| `USE_WEBHOOK` | boolean | If true use webhook else polling. Default false. | |
| `WEBHOOK_HOST` | string | Webhook host for receive Telegram updates (eg. "mywebhook.com"). | |
| `WEBHOOK_PATH` | string | Webhook path (eg. "/bot/"). | |## Requirements
The following requirements are not needful if you are using Docker.
1. [Redis](https://redis.io/) server.
2. You must install _sox_ utility.**Linux:**
```bash
apt install sox libsox-fmt-all
```**Windows:**
Download and install [SoX - Sound eXchange](https://sourceforge.net/projects/sox/).