RossBot is a Telegram bot designed to provide voice recognition and assistance based on user requests. The bot can handle text, voice commands, and retrieve relevant contact information from a dataset. It leverages the OpenAI API to process user input and respond intelligently based on user queries.
- Text and Voice Command Processing: The bot processes both text and voice commands from users.
- Google Speech Recognition: Converts voice messages into text using Google’s speech-to-text API.
- Contact Retrieval: Retrieves relevant contact persons based on the user's input, including department, position, responsibility, and location filters.
- Multilingual: Automatically detects and responds in the user's language based on their Telegram settings.
To run the bot locally, you need the following:
- Python 3.8 or higher
- A Telegram account
- A bot token from Telegram BotFather
- An OpenAI API key
The bot uses FFmpeg to convert voice messages from Telegram's OGG format to WAV, which is required for speech recognition. Follow these steps to install FFmpeg:
On macOS (using Homebrew):
brew install ffmpeg
On Ubuntu:
sudo apt update
sudo apt install ffmpeg
On Windows:
- Download the FFmpeg executable for Windows.
- Add the
bin
folder (where theffmpeg.exe
is located) to your system’s PATH.
You can verify if FFmpeg is installed by running:
ffmpeg -version
-
Clone the repository:
git clone https://github.com/CodesDoWork/ross-bot
-
Install dependencies: Install the required libraries by running:
pip install -r requirements.txt
-
Create a
.env
file: Create a.env
file to store your bot token and OpenAI API key. The file should look like this:BOT_TOKEN=<your-telegram-bot-token> OPENAI_API_KEY=<your-openai-api-key>
-
Run the bot: Start the bot by running:
python src/main.py
You can customize your Telegram experience by applying a custom color scheme. Here’s how:
- Open Telegram on your phone or desktop.
- Navigate to Settings > Chat Settings.
- Scroll down to Change Chat Background and choose a custom color scheme or apply the one provided.
Or use the following link: https://t.me/addtheme/OvOI6tBSrNnNCAXE
To ensure that links (e.g., email or phone actions) are properly opened by external apps (and not within Telegram's browser), follow these steps:
- Open Telegram > Settings > Data and Storage.
- Scroll down to In-App Browser and turn it off.
- This allows links to open in the appropriate external apps (e.g., email or phone apps).
To search for and add the bot to your Telegram account, follow these steps:
- Open the link to your bot provided by BotFather.
- Click Start to initiate a conversation with the bot.
- You can send both text and voice messages to interact with the bot. The bot will process your input and provide the relevant information or assistance.
- Greeting: Type or say "Hello" to get a greeting from the bot.
- Voice Recognition: Send a voice message, and the bot will transcribe it and process your request.
- Contact Retrieval: Ask the bot to provide contacts based on departments, responsibilities, or location (e.g., "Show me people in the IT department").
This project is licensed under the MIT License. See the LICENSE
file for more details.