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 installornpm -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
.envfile. An example.envis provided. - Speaking of
.env, configure your bot token, public url, instagram username and password on your.envfile. - Make your bot's webhook point to your domain. See setWebhook for more info.
Babelgram listens for the following commands:
/startis sent every time a user starts a conversation with your bot. Doesn't really do anything;/setvideolanguagesets the language of the video on instagram;/setmylanguagesets the language that the video will be translated to;/setvoicegives 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.

