The AI Telegram Audio Task Bot is a bot developed using Python and the Telegram API. It utilizes OpenAI's natural language processing capabilities to convert voice messages into text and manage tasks through interactive buttons.
- Clone the Repository
- Create .env File
- Install Dependencies
- Activate Virtual Environment
- Running the Bot
- Users can send questions to the bot.
- The bot requests the context in which to answer the question.
- Once the context is provided, the bot responds with the answer to the question.
- The bot is initialized by sending the /start command in Telegram.
- Telegram API token and OpenAI API key must be configured in a .env file.
- Users can send voice messages containing tasks.
- OpenAI's speech recognition converts voice messages to text.
- Tasks are stored internally with a status (neutral, completed, pending).
- Users can mark tasks as completed or pending using inline buttons.
git clone https://github.com/netto14cr/IA_Telegram_task_Bot_03.git
cd AI_Telegram_ImageBot
-
Create a .env file in the project root directory.
-
Add your Telegram API token to the .env file.
TELEGRAM_TOKEN=your_telegram_token_here OPENAI_API_KEY=your_openai_api_key_here
python -m venv env
source env/bin/activate # For Linux/Mac
.\env\Scripts\activate # For Windows
pip install -r requirements.txt
python ai_audio_task_bot.py
-
User sends a voice message with a task. The bot uses OpenAI to process the audio and converts it into text, displaying the task with options to mark as completed or pending.
Task: Buy groceries: milk, eggs, bread. 📝 Options: - Mark as Completed - Mark as Pending
After receiving the task, users can interact with it using the provided options:
- Mark as Completed: Indicates that the task has been finished.
- Mark as Pending: Indicates that the task is still ongoing or needs further attention.
This bot is for educational purposes and leverages OpenAI's capabilities for speech recognition and task management.