This Telegram bot allows users to send voice messages and receive the transcribed text in return. It works by forwarding the voice message to a Telegram userbot with an active Premium subscription, which uses Telegram’s internal voice-to-text feature. The result is then sent back to the user through the main bot.
- A user sends a voice message to the bot.
- The bot forwards the voice to a Premium-enabled userbot.
- The userbot uses Telegram’s built-in transcription (voice-to-text).
- The transcribed text is returned to the user through the main bot.
- A Telegram Premium account connected as a userbot.
- Python 3.8+
- Redis server (for task state management)
If you prefer a video guide, watch this tutorial on YouTube:
اگر ترجیح میدهید بهصورت ویدیویی آموزش ببینید، این آموزش را در یوتوب مشاهده کنید:
-
Clone the repository:
git clone https://github.com/moradpoor/V_to_T_bot.git cd V_to_T_bot -
Install dependencies:
pip install -r requirements.txt
Required libraries:
telethon,pyrogram,aiogram,python-dotenv,redis -
Create a
.envfile in the root directory and fill in your own credentials:API_ID=your_api_id API_HASH=your_api_hash TOKEN=your_bot_token USERBOT_USERNAME=your_userbot_username DEV=your_telegram_id
-
Run the bot:
python bot.py
-
Run the userbot
python cli.py
این ربات به کاربران اجازه میدهد پیام صوتی (وویس) ارسال کنند و متن تبدیلشده آن را دریافت نمایند. وویس کاربر برای یک یوزربات دارای اشتراک پریمیوم ارسال شده، و با استفاده از قابلیت داخلی تلگرام به متن تبدیل میشود. سپس متن نهایی از طریق ربات برای کاربر ارسال خواهد شد.
- کاربر یک پیام صوتی ارسال میکند.
- رباط آن را برای یوزربات متصل به تلگرام پریمیوم فوروارد میکند.
- یوزربات با استفاده از سرویس رسمی تلگرام وویس را به متن تبدیل میکند.
- متن نهایی توسط رباط اصلی به کاربر بازگردانده میشود.
- یک اکانت تلگرام پریمیوم به عنوان یوزربات
- پایتون 3.8 یا بالاتر
- Redis برای مدیریت وضعیت کاربران
-
ریپازیتوری را کلون کنید:
git clone https://github.com/your-username/V_to_T_bot.git cd V_to_T_bot -
کتابخانههای مورد نیاز را نصب کنید:
pip install -r requirements.txt
کتابخانههای مورد نیاز:
telethon,pyrogram,aiogram,python-dotenv,redis -
فایل
.envرا در پوشهی اصلی بسازید و مقادیر خود را وارد کنید:API_ID=your_api_id API_HASH=your_api_hash TOKEN=your_bot_token USERBOT_USERNAME=your_userbot_username DEV=your_telegram_id
-
اجرای ربات:
python3 bot.py
-
اجرای یوزربات
python3 cli.py
🎉 حالا ربات آمادست!