A telegram bot written for the legendary group ZED, storing voice ids of various files and allowing for related inline queries in Telegram.
To use the source code, you need to create a bot by contacting @BotFather in Telegram. You also need to restore the database dump to Postgres(for now, might add MySQL later as well).
psql zedvoice < zedvoice.sql
After these two steps, make sure you add your token and DB address to environment variables.
export TOKEN= <your_token>
export DATABASE_URL= <database_url> # default on localhost would be postgresql://localhost:5432/zedvoice
Install the requirements from pip:
pip install -r requirements.txt
And finally run the command using Python (3+):
python3 commands.py
- Voice Store and Retrieval
- Query by tags and incomplete name (LIKE queries)
- Other media type upload, conversion and interval selection support
- Upload and Query voice statistics for any user, aiming for better voice recommendation.
- Voice similarity search. Given time there would be good ideas to use packages such as dejavu
- Seperating upload state machine for each user whereas currently one object for all users.
- Better edge case coverage for exception handling.(Still needs some probing)
- Voice file deletion shenanigans. Need to store voices in a separate reference chat message.