summaryrefslogtreecommitdiffstats
path: root/dom/media/webspeech/synth/test/file_setup.html
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-05-20 10:19:04 +0000
committerMoonchild <moonchild@palemoon.org>2020-05-20 14:04:17 +0000
commit99c2e698d2a3c56649e42d8d2133706cd8c9501e (patch)
tree85be449d772eb57860f0f386efb4bc1e790fd498 /dom/media/webspeech/synth/test/file_setup.html
parent15ac4021b06d549e47c9e2efc9364a9eb96bfe82 (diff)
downloadUXP-99c2e698d2a3c56649e42d8d2133706cd8c9501e.tar
UXP-99c2e698d2a3c56649e42d8d2133706cd8c9501e.tar.gz
UXP-99c2e698d2a3c56649e42d8d2133706cd8c9501e.tar.lz
UXP-99c2e698d2a3c56649e42d8d2133706cd8c9501e.tar.xz
UXP-99c2e698d2a3c56649e42d8d2133706cd8c9501e.zip
Issue #1538 - remove speech recognition engine
This removes speech recognition, pocketsphinx, training models and the speech automated test interface. This also re-establishes proper use of MOZ_WEBSPEECH to work for the speech API (synthesis part only) that was a broken mess before, with some synth parts being always built, some parts being built only with it enabled and recognition parts being dependent on it. I'm pretty sure it'd be totally busted if you'd ever have tried building without MOZ_WEBPEECH before. Tested that synthesis still works as-intended. This resolves #1538
Diffstat (limited to 'dom/media/webspeech/synth/test/file_setup.html')
-rw-r--r--dom/media/webspeech/synth/test/file_setup.html95
1 files changed, 0 insertions, 95 deletions
diff --git a/dom/media/webspeech/synth/test/file_setup.html b/dom/media/webspeech/synth/test/file_setup.html
deleted file mode 100644
index 4c1020505..000000000
--- a/dom/media/webspeech/synth/test/file_setup.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=525444
--->
-<head>
- <meta charset="utf-8">
- <title>Test for Bug 525444: Web Speech API check all classes are present</title>
- <script type="application/javascript">
- window.SimpleTest = parent.SimpleTest;
- window.is = parent.is;
- window.isnot = parent.isnot;
- window.ok = parent.ok;
- </script>
- <script type="application/javascript" src="common.js"></script>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=650295">Mozilla Bug 650295</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-/** Test for Bug 525444 **/
-
-ok(SpeechSynthesis, "SpeechSynthesis exists in global scope");
-ok(SpeechSynthesisVoice, "SpeechSynthesisVoice exists in global scope");
-ok(SpeechSynthesisErrorEvent, "SpeechSynthesisErrorEvent exists in global scope");
-ok(SpeechSynthesisEvent, "SpeechSynthesisEvent exists in global scope");
-
-// SpeechSynthesisUtterance is the only type that has a constructor
-// and writable properties
-ok(SpeechSynthesisUtterance, "SpeechSynthesisUtterance exists in global scope");
-var ssu = new SpeechSynthesisUtterance("hello world");
-is(typeof ssu, "object", "SpeechSynthesisUtterance instance is an object");
-is(ssu.text, "hello world", "SpeechSynthesisUtterance.text is correct");
-is(ssu.volume, 1, "SpeechSynthesisUtterance.volume default is correct");
-is(ssu.rate, 1, "SpeechSynthesisUtterance.rate default is correct");
-is(ssu.pitch, 1, "SpeechSynthesisUtterance.pitch default is correct");
-ssu.lang = "he-IL";
-ssu.volume = 0.5;
-ssu.rate = 2.0;
-ssu.pitch = 1.5;
-is(ssu.lang, "he-IL", "SpeechSynthesisUtterance.lang is correct");
-is(ssu.volume, 0.5, "SpeechSynthesisUtterance.volume is correct");
-is(ssu.rate, 2.0, "SpeechSynthesisUtterance.rate is correct");
-is(ssu.pitch, 1.5, "SpeechSynthesisUtterance.pitch is correct");
-
-// Assign a rate that is out of bounds
-ssu.rate = 20;
-is(ssu.rate, 10, "SpeechSynthesisUtterance.rate enforces max of 10");
-ssu.rate = 0;
-is(ssu.rate.toPrecision(1), "0.1", "SpeechSynthesisUtterance.rate enforces min of 0.1");
-
-// Assign a volume which is out of bounds
-ssu.volume = 2;
-is(ssu.volume, 1, "SpeechSynthesisUtterance.volume enforces max of 1");
-ssu.volume = -1;
-is(ssu.volume, 0, "SpeechSynthesisUtterance.volume enforces min of 0");
-
-// Assign a pitch which is out of bounds
-ssu.pitch = 2.1;
-is(ssu.pitch, 2, "SpeechSynthesisUtterance.pitch enforces max of 2");
-ssu.pitch = -1;
-is(ssu.pitch, 0, "SpeechSynthesisUtterance.pitch enforces min of 0");
-
-// Test for singleton instance hanging off of window.
-ok(speechSynthesis, "speechSynthesis exists in global scope");
-is(typeof speechSynthesis, "object", "speechSynthesis instance is an object");
-is(typeof speechSynthesis.speak, "function", "speechSynthesis.speak is a function");
-is(typeof speechSynthesis.cancel, "function", "speechSynthesis.cancel is a function");
-is(typeof speechSynthesis.pause, "function", "speechSynthesis.pause is a function");
-is(typeof speechSynthesis.resume, "function", "speechSynthesis.resume is a function");
-is(typeof speechSynthesis.getVoices, "function", "speechSynthesis.getVoices is a function");
-
-is(typeof speechSynthesis.pending, "boolean", "speechSynthesis.pending is a boolean");
-is(typeof speechSynthesis.speaking, "boolean", "speechSynthesis.speaking is a boolean");
-is(typeof speechSynthesis.paused, "boolean", "speechSynthesis.paused is a boolean");
-
-var voices1 = speechSynthesis.getVoices();
-var voices2 = speechSynthesis.getVoices();
-
-ok(voices1.length == voices2.length, "Voice count matches");
-
-for (var i in voices1) {
- ok(voices1[i] == voices2[i], "Voice instance matches");
-}
-
-SimpleTest.finish();
-</script>
-</pre>
-</body>
-</html>