This Telegram bot converts voice messages and audio files into text using fal.ai's lightning fast transcription service. It supports multiple languages and is designed for easy setup and use.
- Transcribe voice messages and audio files (MP3/WAV) sent via Telegram
- Multi-language support for user interactions (English, German, Spanish, Italian)
- Automatic language detection for bot responses based on user's Telegram language setting
- Optional user whitelist to control access
- Super fast transcription powered by fal.ai
- fal.ai API key (They grant 10$ free API credits here)
- Telegram Bot API key (Instructions below)
- Node.js and npm installed on your system
- your telegram user ID to whitelist it for the bot (if ALLOWED_USER_IDS it not set, the bot will be usable by everyone who finds it!)
-
Clone this repository:
git clone https://github.com/yourusername/telegram-transcribe-bot.git cd telegram-transcribe-bot -
Install dependencies:
npm install -
Copy the example environment file:
cp .env.example .env -
Edit the
.envfile with your API keys:FAL_API_KEY=your_fal_ai_api_key TELEGRAM_BOT_API_KEY=your_telegram_bot_api_key ALLOWED_USER_IDS=123456789,987654321 # Optional: Comma-separated list of allowed user IDs. The bot will be usable by everyone who finds it if it stays empty! AUDIO_LANG=en # language detection is currently not supported by wizper, so choose a language here: https://fal.ai/models/fal-ai/whisper/api
- Start a chat with the BotFather on Telegram
- Send
/newbotand follow the prompts to create a new bot - Once created, BotFather will give you an API key. Use this as your
TELEGRAM_BOT_API_KEY
To start the bot, run:
npm start
- Start a chat with your bot on Telegram
- Send a voice message or audio file (MP3/WAV)
- The bot will respond with the transcribed text
You can even invite it to groups. It needs admin permissions to be able to read (and transcribe) all voice messages + audio files.
The usual languages whisper-ai supports. Transcribe Language auto detection is currently not working. You can set the language in the .env file. Possible values and some documentation are here: https://fal.ai/models/fal-ai/whisper/api
The bot automatically detects the user's language based on their Telegram settings and responds in the appropriate language. Currently supported languages for bot messages are:
- English (en)
- German (de)
- Spanish (es)
- Italian (it)
If a user's language is not among these, the bot will default to English.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
If you find this bot useful and want to support me you can do so here:
