Telegram Bot : Voice Chat, Instant Translate. Tutorial and source code
π Cool Telegram Bot Tutorial: Let Your Voice Go Text Magic! π
Hey, Trendy Youth! Get ready to switch up the game in the communication world with a super cool Telegram bot that makes language barriers a thing of the past. Here's the deal: we've got an awesome tutorial lined up for you, all about creating a Telegram bot that can turn your spoken words directly into written text and automatically translate them into English. But wait, there's more β the bot also provides translation links to Google Translate, for those of you interested in trying out Arabic, Chinese, German, Japanese, and Korean!
π Get Ready for the Exciting Journey Ahead: π
π₯ Stepping into the Future: Let's explore the world of unconventional language technology by tapping into the magic of OpenAI's Whisper API. It's a powerful tool that transforms speech into text!
ποΈ Speak, Translate, Rock On!: Imagine this: your voice in your native language, let's say Indonesian, instantly turning into understandable text and then getting translated into English. Language barriers? No biggie, you can chat like a pro!
π Exploring the Language World: Want to make cross-language communication a breeze? The bot provides translation links to Google Translate, so if you're curious about Arabic, Chinese, German, Japanese, or Korean, you're covered. Right from the bot!
π€ Connect & Elevate Yourself: Amp up your interactions with the help of the bot. It's not just about bridging language gaps, but also fostering cross-cultural friendships. It's going to be a blast!
π οΈ Empowerment in Your Hands: The PHP/MySQL source code we've cooked up is a game-changer. It'll help you build a strong and user-friendly Telegram bot. Even if you're a newbie, this shortcut is going to boost your confidence!
π§ Brilliant Ideas Start Here: Apart from communication, think about all the things you can do with this advanced technology. From language learning platforms to accessibility tools β it's all within your grasp.
π Ready to Embark on a New Adventure!
Change the way people chat, bridge language gaps, and become a pioneer in AI-powered language solutions. Don't miss out on the chance to learn from this premium source code tutorial. Get ready to create a Telegram bot that's not only cool but also a game-changer!
π [Get Yours Now]
Unleash the true potential of language transformation β every word you say can become a breakthrough! Let's kickstart your innovation journey right now! ππ£οΈ
https://www.youtube.com/watch?v=tfuqDj83K6o
=================== GUIDANCE ====================================
This Telegram bot script functions to record your voice or your user's voice in your native language (the example in this code is Indonesian, but you can replace it with your own non-English native language). The voice will be translated in the form of text and will be translated into English.
Audio voice sound files are stored in the file folder, make sure the file folder has permission to receive files. set it to 775 or 777.
The telegram bot script will also provide a handy link to google translate to translate into other languages.
The script uses Php and mysql. You must have your own https domain and be hosted on your own cloud vps or shared host. Telegram bot sdk using the code here https://github.com/irazasyed/telegram-bot-sdk .
if the replicate.com server is full, there will be a possibility of a delay of 15 minutes to 30 minutes. be patient please. Normal process duration is 1 to 5 minutes.
To use this script, you must have
1. Cloud VPS or shared hosting your ownself
2. Access the Replicate token API which can be registered here https://replicate.com/account/api-tokens
3. Understand php and mysql and how the rest API JSON works.
4. The open whisper API replicate API access fee is around $ 0.03 for the process of converting speech to text with a duration of 30-60 seconds.
5. Create a mysql database, Run the database.sql script to the database on your VPS / shared hosting
6. Create a Cron Job file (sudo crontab -e), copy paste the root file into your cronjob.
7. Check the db.php file, fill in the variables below
$mySQLserver = "";
$mySQLuser = "";
$mySQLpassword = "";
$mySQLdefaultdb = "";
8. Check the settings.php file, fill in the variables
8.A. TelegramBot API tokens. Register your telegram bot at botfather.
8.B. fill value of BotName with your telegram bot name
8.C. Fill in the Host value as your domain or subdomain name and the application folder where the source code is placed
8.D. Signup to Replicate.com , generate API key here . https://replicate.com/account/api-tokens
8.E. Fill in your Telegram ID value in the $admin variable. Find info on how to find a telegram id here https://www.youtube.com/watch?v=W8ifn3ATpdA
9. Run your webhook.php file, then type something in your telegram bot test.
10. press the microphone button on the telegram bot, then say something, wait for the results in 1-5 minutes, it will be translated in text and English
source code in php and mysql script. video demo https://www.youtube.com/watch?v=tfuqDj83K6o