A Telegram bot for speech recognition from voice and video messages using Nexara (OpenAI Whisper).
- Accepts voice and video messages in Telegram.
- Recognizes speech using the Nexara STT API (based on OpenAI Whisper).
- Sends the user a text transcription of the audio.
- Logs events via Logfire.
- Can work in groups: automatically recognizes speech from voice and video messages in a group (if given admin rights).
git clone https://github.com/BuT9l3b/Red_STT_Bot.git
cd Red_STT_Botpip install -r requirements.txtCreate a .env file in the project root and add the following:
TG_TOKEN=your_telegram_token
NEXARA_TOKEN=your_nexara_token
LOGFIRE_TOKEN=your_logfire_token
python main.pymain.py— main file to run the Telegram bot.stt.py— module for working with the Nexara STT API.message_tools.py— helper functions for sending messages.texts.py— text templates for messages.
- Start the bot.
- Send
/startto it in Telegram. - Send a voice or video message.
- Receive the text transcription of the audio.
- Python 3.8+
- aiogram
- openai
- httpx
- python-dotenv
- logfire
- telegramify_markdown
Install all dependencies with:
pip install -r requirements.txtMIT License