Sign in

Зарегистрируйтесь, чтобы стать полноправным участником сообщества Masterpro.ws.

Deploying Google-Cloud-TTS-Rails with Heroku

 

 

In order to deploy to Heroku, you need to have an account with them. If you haven't, click here to sign up. Before you can deploy to Heroku, Git and Heroku toolbelt should have already installed.

Now you need to get a JSON file that contains your key to access API Google Cloud Text-to-Speech.
Follow these instructions.

Then:

git clone https://github.com/cmirnow/Google-Cloud-TTS-Rails.git
cd Google-Cloud-TTS-Rails

Ok, put YOUR_KEY_NAME.json into the root of the directory Google-Cloud-TTS-Rails now.

Next:

git add .   
git commit -m "my first commit"
heroku create
git push heroku master
heroku run rake db:migrate

Go to Heroku.com administration panel, YOUR_NEW_APPLICATION -> 'Settings' -> 'Reveal Config Vars' and add a new key/value lines:

key: GOOGLE_APPLICATION_CREDENTIALS
value: YOUR_KEY_NAME.json

key: DOMAIN_NAME
value: YOUR_HEROKU_DOMAIN ### i.e 'https://***************.herokuapp.com' without quotes.

key: GMAIL_USER_NAME
value: YOUR_GMAIL_LOGIN

key: GMAIL_PASSWORD
value: YOUR_GMAIL_PASSWORD

Everything working? Great. Now open your new application in a browser and click 'Sign Up'. Register and you can start converting text to sound.

 

How to convert text to speech using Google Cloud Text-to-Speech API and Ruby
How to convert text to speech using Google Cloud Text-to-Speech API and Ruby

 

Оставить комментарий

Добавьте ваш комментарий