Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
s/var/const/g
Browse files Browse the repository at this point in the history
  • Loading branch information
Rebecca Taylor committed Mar 23, 2018
1 parent 562a440 commit 5131b3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion samples/listVoices.js
Expand Up @@ -19,7 +19,7 @@ function listVoices() {
// [START tts_list_voices]
const textToSpeech = require('@google-cloud/text-to-speech');

var client = new textToSpeech.TextToSpeechClient();
const client = new textToSpeech.TextToSpeechClient();

client.listVoices({})
.then(results => {
Expand Down
16 changes: 8 additions & 8 deletions samples/synthesize.js
Expand Up @@ -20,15 +20,15 @@ function synthesizeText(text, outputFile) {
const textToSpeech = require('@google-cloud/text-to-speech');
const fs = require('fs');

var client = new textToSpeech.TextToSpeechClient();
const client = new textToSpeech.TextToSpeechClient();

/**
* TODO(developer): Uncomment the following lines before running the sample.
*/
// const text = 'Text to synthesize, eg. hello';
// const outputFile = 'Local path to save audio file to, e.g. output.mp3';

var request = {
const request = {
input: { text: text },
voice: { languageCode: 'en-US', ssmlGender: 'FEMALE' },
audioConfig: { audioEncoding: 'MP3' }
Expand All @@ -52,15 +52,15 @@ function synthesizeSsml(ssml, outputFile) {
const textToSpeech = require('@google-cloud/text-to-speech');
const fs = require('fs');

var client = new textToSpeech.TextToSpeechClient();
const client = new textToSpeech.TextToSpeechClient();

/**
* TODO(developer): Uncomment the following lines before running the sample.
*/
// const ssml = 'SSML to synthesize, eg. <?xml version="1.0"?><speak...';
// const outputFile = 'Local path to save audio file to, e.g. output.mp3';

var request = {
const request = {
input: { ssml: ssml },
voice: { languageCode: 'en-US', ssmlGender: 'FEMALE' },
audioConfig: { audioEncoding: 'MP3' }
Expand All @@ -84,15 +84,15 @@ function synthesizeTextFile(textFile, outputFile) {
const textToSpeech = require('@google-cloud/text-to-speech');
const fs = require('fs');

var client = new textToSpeech.TextToSpeechClient();
const client = new textToSpeech.TextToSpeechClient();

/**
* TODO(developer): Uncomment the following lines before running the sample.
*/
// const textFile = 'Local path to text file, eg. input.txt';
// const outputFile = 'Local path to save audio file to, e.g. output.mp3';

var request = {
const request = {
input: { text: fs.readFileSync(textFile) },
voice: { languageCode: 'en-US', ssmlGender: 'FEMALE' },
audioConfig: { audioEncoding: 'MP3' }
Expand All @@ -116,15 +116,15 @@ function synthesizeSsmlFile(ssmlFile, outputFile) {
const textToSpeech = require('@google-cloud/text-to-speech');
const fs = require('fs');

var client = new textToSpeech.TextToSpeechClient();
const client = new textToSpeech.TextToSpeechClient();

/**
* TODO(developer): Uncomment the following lines before running the sample.
*/
// const ssmlFile = 'Local path to SSML file, eg. input.ssml';
// const outputFile = 'Local path to save audio file to, e.g. output.mp3';

var request = {
const request = {
input: { ssml: fs.readFileSync(ssmlFile) },
voice: { languageCode: 'en-US', ssmlGender: 'FEMALE' },
audioConfig: { audioEncoding: 'MP3' }
Expand Down

0 comments on commit 5131b3a

Please sign in to comment.