GroupLang-secretary-bot is a Telegram bot that transcribes voice messages, summarizes the content, and allows users to tip for the service. It utilizes AWS services for transcription and a custom API for summarization. The bot is designed to be deployed as an AWS Lambda function.
- Features
- Prerequisites
- Installation
- Configuration
- Usage
- Getting Started
- Deployment
- API Reference
- Contributing
- Transcribes voice messages using AWS Transcribe
- Summarizes transcribed text using a custom API
- Allows users to tip for the service
- Secures handling of API keys and tokens
- Is 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
To quickly get started with the GroupLang-secretary-bot, follow these steps:
-
Clone the repository and navigate into the project directory.
-
Install Poetry and the project dependencies.
-
Set up the necessary environment variables as described in the Configuration section.
-
Start the bot using the provided command.
-
Interact with the bot on Telegram by sending voice messages.
-
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
-
Configures AWS credentials:
- Either set up the AWS CLI or use environment variables as mentioned above
-
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 with
aws configure
or use environment variables as mentioned above. - Ensure that your AWS IAM user has the necessary permissions for AWS Transcribe.
- Either set up the AWS CLI with
-
Activate the Poetry virtual environment:
poetry shell
-
Start the bot:
uvicorn main:app --reload
-
On Telegram, start a conversation with the bot or add it to a group
-
Sends a voice message to the bot
-
The bot transcribes the audio, summarizes the content, and sends the result back
-
Users can tip using the inline button provided in the response
-
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.
We welcome contributions to the GroupLang-secretary-bot! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request. Please ensure that your contributions align with the project's coding standards and include appropriate tests.
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.