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

Commit

Permalink
Samples: change printed output after writing mp3 files
Browse files Browse the repository at this point in the history
  • Loading branch information
Rebecca Taylor committed Mar 23, 2018
1 parent 4b01e93 commit d33b076
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions samples/synthesize.js
Expand Up @@ -39,7 +39,7 @@ function synthesizeText(text, outputFile) {
const audioContent = results[0].audioContent;

fs.writeFileSync(outputFile, audioContent, 'binary');
console.log(`Saved synthesized text to local audio file ${outputFile}`);
console.log(`Audio content written to file: ${outputFile}`);
})
.catch(err => {
console.error('ERROR:', err);
Expand Down Expand Up @@ -71,7 +71,7 @@ function synthesizeSsml(ssml, outputFile) {
const audioContent = results[0].audioContent;

fs.writeFileSync(outputFile, audioContent, 'binary');
console.log(`Saved synthesized text to local audio file ${outputFile}`);
console.log(`Audio content written to file: ${outputFile}`);
})
.catch(err => {
console.error('ERROR:', err);
Expand Down Expand Up @@ -103,7 +103,7 @@ function synthesizeTextFile(textFile, outputFile) {
const audioContent = results[0].audioContent;

fs.writeFileSync(outputFile, audioContent, 'binary');
console.log(`Saved synthesized text to local audio file ${outputFile}`);
console.log(`Audio content written to file: ${outputFile}`);
})
.catch(err => {
console.error('ERROR:', err);
Expand Down Expand Up @@ -135,7 +135,7 @@ function synthesizeSsmlFile(ssmlFile, outputFile) {
const audioContent = results[0].audioContent;

fs.writeFileSync(outputFile, audioContent, 'binary');
console.log(`Saved synthesized text to local audio file ${outputFile}`);
console.log(`Audio content written to file: ${outputFile}`);
})
.catch(err => {
console.error('ERROR:', err);
Expand Down
8 changes: 4 additions & 4 deletions samples/system-test/synthesize.test.js
Expand Up @@ -53,7 +53,7 @@ test(`should synthesize audio from text`, async t => {
`${cmd} text '${text}' --outputFile '${outputFile}'`,
cwd
);
t.true(output.includes(`Saved synthesized text to local audio file ${outputFile}`));
t.true(output.includes(`Audio content written to file: ${outputFile}`));
t.true(fs.existsSync(outputFile));
});

Expand All @@ -63,7 +63,7 @@ test(`should synthesize audio from ssml`, async t => {
`${cmd} ssml '${ssml}' --outputFile '${outputFile}'`,
cwd
);
t.true(output.includes(`Saved synthesized text to local audio file ${outputFile}`));
t.true(output.includes(`Audio content written to file: ${outputFile}`));
t.true(fs.existsSync(outputFile));
});

Expand All @@ -73,7 +73,7 @@ test(`should synthesize audio from text file`, async t => {
`${cmd} text-file '${files[0].localPath}' --outputFile '${outputFile}'`,
cwd
);
t.true(output.includes(`Saved synthesized text to local audio file ${outputFile}`));
t.true(output.includes(`Audio content written to file: ${outputFile}`));
t.true(fs.existsSync(outputFile));
});

Expand All @@ -83,6 +83,6 @@ test(`should synthesize audio from ssml file`, async t => {
`${cmd} ssml-file '${files[1].localPath}' --outputFile '${outputFile}'`,
cwd
);
t.true(output.includes(`Saved synthesized text to local audio file ${outputFile}`));
t.true(output.includes(`Audio content written to file: ${outputFile}`));
t.true(fs.existsSync(outputFile));
});

0 comments on commit d33b076

Please sign in to comment.