CyberBukit TTS

Guideline of Google Cloud Text-to-Speech

There are several facts you may need to know about Google Cloud Text-to-Speech.

1. Google Cloud Text-to-Speech offers two types of voice, Standard and WaveNet. The standard voice sounds like a robot, but the price is low. The WaveNet voice sounds like a real person, but the price is a bit higher.

2. Google Cloud offers 1 million characters per month for free use. After that, you will be billed $4.00 per 1 million characters for standard voice or $16.00 per 1 million characters for WaveNet voice. This is the same as AWS Polly.

3. Google Cloud offers you $300 for the first three months when you create an account.

4. Differ from AWS Polly, no matter how many characters in one text, all TTS voice file will be stored on your server, AWS S3 or Wasabi depending on your setting.

Let's assume you already have an AWS account. Create it if you haven't. https://cloud.google.com/

Steps of configuration on Google Cloud

1. Sign in Google Cloud

https://console.cloud.google.com/

2. Create a new project

Click 'My First Project', Click 'NEW PROJECT' at the right top. Fill in 'Project name', Click 'CREATE', then select this new project after it's created.

3. Enable the Text-to-Speech API and create credentials

Step 1.
Search 'Text-to-Speech'
Click 'Cloud Text-to-Speech API'
Click 'ENABLE'

Step 2.
Click 'Credentials' on the left side
Click 'CREATE CREDENTIALS' at the top
Select 'Service account'
Fill in the 'Service account name' and 'Service account ID'
Click 'DONE'

Step 3.
Reload the page and select the account you just created
Click 'ADD KEY'
Click 'Create new key', select 'JSON' as 'key type'
Click 'CREATE'
Thus, a file will be automatically downloaded to your local computer. This file is your service credentials.

This is the end of the configuration on Google Cloud.

Steps of configuration on CyberBukit TTS

Considering the safety reason, the Google Cloud credential file should be saved outside the web directory. Please follow the steps to finish the configuration.

1. As an example, The name of the file we just downloaded is 'clever-oasis-301913-db6dfcb7783e.json', we upload it to '/var/www/config/', So the 'Configuration File Path' is '/var/www/config/clever-oasis-301913-db6dfcb7783e.json'. Do make sure this directory(/var/www/config) cannot be visited from the internet.
Please note this path(/var/www/config/clever-oasis-301913-db6dfcb7783e.json) is only an example, it varies depending on your server. Overall, it should be the file's absolute path in your server. 

2.Sign in as super admin on CyberBukit TTS, go to TTS Management -> TTS Configuration, at 'Google Text-to-Speech Setting (TTS Only)' part, fill in like the following:

This is the end of the configuration on CyberBukit TTS.

Before you proceed, please do confirm that your configuration file is stored outside your site's root directory and it can not be visited from the internet. The importance of this file is the same as your credit card.

If you're unsure about this security problem, please submit a ticket, and we'll check for you. Please include your script URL and the value of 'Configuration File Path'(like '/var/www/config/google.json', not the file's content) in the ticket.

Next step, you need to sync TTS resource from Google Cloud, then you will be ready to use. See TTS Resource Management