forked from kripken/speak.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
39 lines (36 loc) · 1.58 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html>
<title>speak.js: Text-to-Speech on the Web</title>
<head>
<script>
// This demo is licensed under the GNU GPL.
</script>
<script src="speakClient.js"></script>
</head>
<body>
<h1>speak.js</h1>
<h2>Text-To-Speech on the Web</h2>
<form onsubmit="speak(text.value, { amplitude: amplitude.value, wordgap: workdgap.value, pitch: pitch.value, speed: speed.value }); return false">
Text: <input type="text" name="text" size=50 value="Never gonna give, you, up.">
Amplitude: <input type="text" name="amplitude" size=5 value="100">
Pitch: <input type="text" name="pitch" size=5 value="50">
Speed: <input type="text" name="speed" size=5 value="175">
Word gap: <input type="text" name="workdgap" size=5 value="0">
<input type="submit" value="Go!">
</form>
<hr>
<p>
This demo is 100% clientside JavaScript. It uses <a href="http://espeak.sourceforge.net/">eSpeak</a>, an open source
speech synthesizer, which was compiled from C++ to JavaScript using <a href="http://emscripten.org">Emscripten</a>.
The project page and source code for this demo can be found <a href="https://github.com/kripken/speak.js">here</a>.
</p>
<p>
Browser requirements:
<ul>
<li><b>Typed arrays</b>. The eSpeak code is not portable to the extent that would be necessary to avoid using typed arrays.
(It should however be possible to rewrite small bits of eSpeak to fix that.)
Typed arrays are present in Firefox and Chrome, and hopefully by the time you read this in IE, Safari and Opera.</li>
</ul>
</p>
<div id="audio"></div>
</body>
</html>