Babelgram uses voice recognition and speech synthesis to translate Instagram's stories to your desired language using IBM Watson's Speech to Text, Translation and Text to Speech services.
- Clone this project and install all dependencies using
yarn install
ornpm -i
- Create your Telegram bot using botfather.
- Have a redis server running. See instructions for installing here
- Have an accessible public domain to host your project. I recommend ngrok for local development and heroku for deploying.
- You'll need an IBM Cloud account to use the speech to text, text to speech and language translator services. Don't worry, they have a free plan.
- Grab your key and url from each of your services and put them in your
.env
file. An example.env
is provided. - Speaking of
.env
, configure your bot token, public url, instagram username and password on your.env
file. - Make your bot's webhook point to your domain. See setWebhook for more info.
Babelgram listens for the following commands:
/start
is sent every time a user starts a conversation with your bot. Doesn't really do anything;/setvideolanguage
sets the language of the video on instagram;/setmylanguage
sets the language that the video will be translated to;/setvoice
gives you a choice between male and female voices;
currently the bot expects you to set the webhook in the following format: https://your-domain.com/{yourSecretToken}/update/
where {yourSecretToken}
is the WEBHOOK_SECRET
configured in the .env
file.