diff --git a/texttospeech/test/audioProfile.test.js b/texttospeech/test/audioProfile.test.js index 1219b851b6..310bdd6490 100644 --- a/texttospeech/test/audioProfile.test.js +++ b/texttospeech/test/audioProfile.test.js @@ -17,7 +17,9 @@ const fs = require('fs'); const {assert} = require('chai'); -const {execSync} = require('child_process'); +const cp = require('child_process'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cmd = 'node audioProfile.js'; const text = 'Hello Everybody! This is an Audio Profile Optimized Sound Byte.'; diff --git a/texttospeech/test/listVoices.test.js b/texttospeech/test/listVoices.test.js index c35bd671eb..ae743c7b01 100644 --- a/texttospeech/test/listVoices.test.js +++ b/texttospeech/test/listVoices.test.js @@ -16,7 +16,9 @@ 'use strict'; const {assert} = require('chai'); -const {execSync} = require('child_process'); +const cp = require('child_process'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cmd = 'node listVoices.js'; diff --git a/texttospeech/test/quickstart.test.js b/texttospeech/test/quickstart.test.js index 946f908c2e..e0a4d54a3b 100644 --- a/texttospeech/test/quickstart.test.js +++ b/texttospeech/test/quickstart.test.js @@ -17,7 +17,9 @@ const fs = require('fs'); const {assert} = require('chai'); -const {execSync} = require('child_process'); +const cp = require('child_process'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const outputFile = 'output.mp3'; diff --git a/texttospeech/test/synthesize.test.js b/texttospeech/test/synthesize.test.js index 45b7500918..526c41f0c0 100644 --- a/texttospeech/test/synthesize.test.js +++ b/texttospeech/test/synthesize.test.js @@ -18,7 +18,9 @@ const fs = require('fs'); const path = require('path'); const {assert} = require('chai'); -const {execSync} = require('child_process'); +const cp = require('child_process'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cmd = 'node synthesize.js'; const text = 'Hello there.';