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

Commit

Permalink
Samples: use simple SSML examples, eg. <speak>Hello there.</speak>
Browse files Browse the repository at this point in the history
  • Loading branch information
Rebecca Taylor committed Mar 23, 2018
1 parent 964afec commit d43ad19
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
8 changes: 1 addition & 7 deletions samples/resources/hello.ssml
@@ -1,7 +1 @@
<?xml version="1.0"?>
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
http://www.w3.org/TR/speech-synthesis/synthesis.xsd" xml:lang="en-US">
Hello there.
</speak>
<speak>Hello there.</speak>
4 changes: 2 additions & 2 deletions samples/synthesize.js
Expand Up @@ -58,7 +58,7 @@ function synthesizeSsml(ssml, outputFile) {
/**
* TODO(developer): Uncomment the following lines before running the sample.
*/
// const ssml = 'SSML to synthesize, eg. <?xml version="1.0"?><speak...';
// const ssml = '<speak>Hello there.</speak>';
// const outputFile = 'Local path to save audio file to, e.g. output.mp3';

const request = {
Expand Down Expand Up @@ -177,7 +177,7 @@ require(`yargs`) // eslint-disable-line
},
})
.example(`node $0 text "hello" -o hello.mp3`)
.example(`node $0 ssml "<?xml..." -o hello.mp3`)
.example(`node $0 ssml "<speak>Hello there.</speak>" -o hello.mp3`)
.example(`node $0 text-file filename.txt -o output.mp3`)
.example(`node $0 ssml-file filename.ssml -o output.mp3`)
.wrap(120)
Expand Down
8 changes: 1 addition & 7 deletions samples/system-test/synthesize.test.js
Expand Up @@ -23,13 +23,7 @@ const tools = require(`@google-cloud/nodejs-repo-tools`);
const cmd = `node synthesize.js`;
const cwd = path.join(__dirname, `..`);
const text = `Hello there.`;
const ssml = `<?xml version="1.0"?>
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
http://www.w3.org/TR/speech-synthesis/synthesis.xsd" xml:lang="en-US">
Hello there.
</speak>`;
const ssml = `<speak>Hello there.</speak>`;
const outputFile = `test-output.mp3`;
const files = [`hello.txt`, `hello.ssml`].map(name => {
return {
Expand Down

0 comments on commit d43ad19

Please sign in to comment.