How to get service account JSON file for authentication
Go to Google Cloud Console and select the project you want to add text to speech API
Open sidebar and select APIs and Services then Library
Search for text to speech and select Cloud Text-to-Speech API
Enable Cloud Text-to-Speech API. To do this you need to have enabled billing
Open sidebar go to APIs and Services and select Credentials
Click Create Credentials and select Service account
Add service account name select Owner as role and click done
Select created Service account
Go to keys tab and click Add Key button
Then select JSON and click Create. Then it will ask you to save Service Account JSON file. You can upload it in settings page of WPTTS to authenticate