This script can be run locally on Mac or Linux OS to transpose a text file "text.txt" into a series of sequential dictated audio files. A great use case it to transpose pdf's documents into audio books.
Linux
sudo apt-get install node sudo apt-get install npm
From the command line navigate into the Wavenet-Text-to-Speech-Example and run the following command.
npm install
Swap out the location of your service account json key file.
GOOGLE_APPLICATION_CREDENTIALS="/Users/refactored/Desktop/wavenet-service-account.json" npm start
The above command allows us to bypass having to download the gcloud SDK utility by directly passing our service account credentials.
Alternative way to run the script
GOOGLE_APPLICATION_CREDENTIALS="/Users/refactored/Desktop/wavenet-service-account.json" node main.js