GroupLang-secretary-bot is a Telegram bot that transcribes voice messages, summarizes the content, and allows users to tip for the service. It uses AWS services for transcription and a custom API for summarization. The bot is designed to be deployed as an AWS Lambda function.
- Transcribe voice messages using AWS Transcribe
- Summarize transcribed text using a custom API
- Allow users to tip for the service
- Secure handling of API keys and tokens
- Deployable as an AWS Lambda function
- Poetry for dependency management
- AWS account with Transcribe access
- Telegram Bot Token
- MarketRouter API Key
-
Clone the repository:
git clone https://github.com/yourusername/GroupLang-secretary-bot.git cd GroupLang-secretary-bot
-
Install Poetry if you haven't already:
curl -sSL https://install.python-poetry.org | python3 -
-
Install dependencies using Poetry:
poetry install
-
Set up environment variables:
TELEGRAM_BOT_TOKEN
: Your Telegram Bot TokenAWS_ACCESS_KEY_ID
: Your AWS Access Key IDAWS_SECRET_ACCESS_KEY
: Your AWS Secret Access KeyMARKETROUTER_API_KEY
: Your MarketRouter API Key
-
Configure AWS credentials:
- Either set up the AWS CLI or use environment variables as mentioned above
-
Activate the Poetry virtual environment:
poetry shell
-
Start the bot:
uvicorn main:app --reload
-
In Telegram, start a conversation with the bot or add it to a group
-
Send a voice message to the bot
-
The bot will transcribe the audio, summarize the content, and send the result back
-
Users can tip using the inline button provided with the response
To add a new package:
poetry add package_name
To update all packages:
poetry update
To update a specific package:
poetry update package_name
The bot uses the following external APIs:
- AWS Transcribe: For audio transcription
- MarketRouter API: For text summarization and reward submission
Refer to the respective documentation for more details on these APIs.