function testFunc(done_cb) {
synthTestQueue(
[[{text: "Hello, world."},
{ uri: langUriMap['en-JM'] }],
[{text: "Bonjour tout le monde .",
args: { lang: "fr", rate: 0.5, pitch: 0.75 }},
{ uri: langUriMap['fr-CA'], rate: 0.5, pitch: 0.75}],
[{text: "How are you doing?", args: { lang: "en-GB" } },
{ rate: 1, pitch: 1, uri: langUriMap['en-GB']}],
[{text: "Come stai?", args: { lang: "it-IT-fail" } },
{ rate: 1, pitch: 1, uri: langUriMap['it-IT-fail'], err: true }],
[{text: "¡hasta mañana!", args: { lang: "es-MX" } },
{ uri: langUriMap['es-MX'] }]],
function () { var test_data = []; var voices = speechSynthesis.getVoices();
for (let voice of voices) {
if (voice.lang.split("-").length > 2) {
// Skip voices that don't automatically end with success
continue;
}
test_data.push([{text: "Hello world", args: { voice} },
{uri: voice.voiceURI}]);
}
synthTestQueue(test_data, done_cb);
});
}
// Run test with no global queue, and then run it with a global queue.
testFunc(function() {
SpecialPowers.pushPrefEnv(
{ set: [['media.webspeech.synth.force_global_queue', true]] }, function() {
testFunc(SimpleTest.finish)
});
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.