wiki2ssml
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "wiki2ssml", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Wiki2SSML provides the WikiVoice markup language used for fine-tuning synthesised voice.", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -58,3 +58,3 @@ "use strict"; | ||
expect(parsed).to.be.a("string"); | ||
expect(parsed).to.equal(head + "<prosody volume=\"100.0\" rate=\"2.0\">TEXT</prosody>" + tail); | ||
expect(parsed).to.equal(head + "<prosody rate=\"2.0\" volume=\"100.0\">TEXT</prosody>" + tail); | ||
}); | ||
@@ -65,3 +65,3 @@ | ||
expect(parsed).to.be.a("string"); | ||
expect(parsed).to.equal(head + "<prosody volume=\"100.0\" rate=\"2.0\">TEXT</prosody>" + tail); | ||
expect(parsed).to.equal(head + "<prosody rate=\"2.0\" volume=\"100.0\">TEXT</prosody>" + tail); | ||
}); | ||
@@ -97,4 +97,4 @@ | ||
describe("Silence with duration", () => { | ||
it("should parse [[silence:0.5]] and output SSML string", () => { | ||
var parsed = undertest.parseToSsml("[[silence:0.5]]", "en-GB"); | ||
it("should parse [[silence:0.5s]] and output SSML string", () => { | ||
var parsed = undertest.parseToSsml("[[silence:0.5s]]", "en-GB"); | ||
expect(parsed).to.be.a("string"); | ||
@@ -104,4 +104,4 @@ expect(parsed).to.equal(head + "<break time=\"0.5s\"/>" + tail); | ||
it("should parse [[sil:0.5]] and output SSML string", () => { | ||
var parsed = undertest.parseToSsml("[[sil:0.5]]", "en-GB"); | ||
it("should parse [[sil:0.5s]] and output SSML string", () => { | ||
var parsed = undertest.parseToSsml("[[sil:0.5s]]", "en-GB"); | ||
expect(parsed).to.be.a("string"); | ||
@@ -244,10 +244,9 @@ expect(parsed).to.equal(head + "<break time=\"0.5s\"/>" + tail); | ||
it("should detect and validate markups", () => { | ||
expect(undertest.hasValidMarkups("[[volume:100.0|TEXT]] and [[silence:0.5]] and [[substitute:substitute|original]] are markups")).to.be.true; | ||
expect(undertest.hasValidMarkups("[[volume:100.0TEXT]] and [silence:0.5]] and [[substitute:substitute|original]] are markups")).to.be.false; | ||
expect(undertest.hasValidMarkups("[[volume:100.0|TEXT]] and [[silence:0.5s]] and [[substitute:substitute|original]] are markups")).to.be.true; | ||
expect(undertest.hasValidMarkups("This is a test without markups")).to.be.false; | ||
expect(undertest.hasValidMarkups("[[volume:100|TEXT]] and [[silence:5]] and [[substitute:substitute|original]] are markups")).to.be.true; | ||
expect(undertest.hasValidMarkups("[[volume:100|TEXT]] and [[silence:5s]] and [[substitute:substitute|original]] are markups")).to.be.true; | ||
}); | ||
it("should strip markups and output plain text", () => { | ||
var parsed = undertest.parseToPlainText("[[volume:100.0|TEXT]] and [[silence:0.5]] and [[substitute:substitute|original]] are present"); | ||
var parsed = undertest.parseToPlainText("[[volume:100.0|TEXT]] and [[silence:0.5s]] and [[substitute:substitute|original]] are present"); | ||
expect(parsed).to.be.a("string"); | ||
@@ -254,0 +253,0 @@ expect(parsed).to.equal("TEXT and and original are present"); |
Sorry, the diff of this file is not supported yet
35215
331